Skip to content

Commit 3d3f1d8

Browse files
committed
Rename to Workhs
1 parent 6758771 commit 3d3f1d8

File tree

9 files changed

+110
-709
lines changed

9 files changed

+110
-709
lines changed

.gitignore

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,21 @@
1-
cabal.sandbox.config
1+
2+
# Created by https://www.gitignore.io/api/haskell
3+
4+
### Haskell ###
5+
dist
6+
cabal-dev
7+
*.o
8+
*.hi
9+
*.chi
10+
*.chs.h
11+
*.dyn_o
12+
*.dyn_hi
13+
.hpc
14+
.hsenv
215
.cabal-sandbox/
3-
dist/
4-
TAGS
16+
cabal.sandbox.config
17+
*.prof
18+
*.aux
19+
*.hp
20+
.stack-work/
21+

LICENSE

Lines changed: 21 additions & 674 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
# Engager
2-
3-
Haskell library to write tutorials inspired by [workshopper](https://github.com/rvagg/workshopper).
1+
# workhs
2+
Make yourself some workshops for great good.

examples/HelloNode/Main.hs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
module Main where
44

5-
import Data.Map.Strict (fromList)
6-
import Data.Text (Text)
7-
import Engager.Core
8-
import Engager.Exercise
9-
import System.Process (readProcessWithExitCode)
5+
import Data.Map.Strict (fromList)
6+
import Data.Text (Text)
7+
import Engager.Exercise
8+
import Workhs.Core
9+
import Workhs.Exercise
1010

1111
helloWorld :: (Text, Exercise)
1212
helloWorld = ( "hello-world"
13-
, Exercise "Hello World"
13+
, Exercise "Hello World"
1414
"Create a file called \"hello-world.js\" and Write a program that prints \"hello world\" to the console."
1515
(do (_, out, _) <- readProcessWithExitCode "node" ["hello-world.js"] ""
1616
return $ if out == "hello world\n"

src/Engager/Core.hs renamed to src/Workhs/Core.hs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
{-# LANGUAGE OverloadedStrings, LambdaCase #-}
1+
{-# LANGUAGE LambdaCase #-}
2+
{-# LANGUAGE OverloadedStrings #-}
23

3-
module Engager.Core (run) where
4+
module Workhs.Core (run) where
45

56
import Data.Map.Strict (Map)
67
import qualified Data.Map.Strict as M
78
import Data.Text (Text)
8-
import qualified Data.Text as T
9-
import Engager.Exercise (Exercise(..))
10-
import Engager.Interface (mainScreen)
9+
import Engager.Exercise (Exercise (..))
1110
import Graphics.Vty.Widgets.Core (defaultContext)
1211
import Graphics.Vty.Widgets.EventLoop (runUi)
1312
import Options.Applicative
13+
import Workhs.Exercise (Exercise (..))
14+
import Workhs.Interface (mainScreen)
1415

1516
data Options = Options (Maybe String)
1617

src/Engager/Exercise.hs renamed to src/Workhs/Exercise.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
module Engager.Exercise (Exercise(..)) where
1+
module Workhs.Exercise (Exercise(..)) where
22

3-
import Data.Text (Text)
4-
import Prelude (Either, IO)
3+
import Data.Text (Text)
4+
import Prelude (Either, IO)
55

66
data Exercise = Exercise { exerciseTitle :: Text
77
, exerciseStatement :: Text

src/Engager/Interface.hs renamed to src/Workhs/Interface.hs

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
{-# LANGUAGE OverloadedStrings #-}
22

3-
module Engager.Interface (mainScreen) where
3+
module Workhs.Interface (mainScreen) where
44

5-
import Engager.Exercise
6-
import Control.Monad (forM_)
7-
import Graphics.Vty.Input (Key(..), Modifier(..))
8-
import Graphics.Vty.Widgets.Box (vBox, setBoxChildSizePolicy, ChildSizePolicy(..))
9-
import Graphics.Vty.Widgets.Core (newFocusGroup, addToFocusGroup, onKeyPressed)
10-
import Graphics.Vty.Widgets.EventLoop (Collection, newCollection, addToCollection)
11-
import Graphics.Vty.Widgets.Text (plainText)
12-
import Graphics.Vty.Widgets.List (ActivateItemEvent(..), newList, addToList, onItemActivated)
13-
import System.Exit (exitSuccess)
5+
import Engager.Exercise
6+
import Graphics.Vty.Input (Key (..), Modifier (..))
7+
import Graphics.Vty.Widgets.Box (ChildSizePolicy (..),
8+
setBoxChildSizePolicy, vBox)
9+
import Graphics.Vty.Widgets.Core (addToFocusGroup, newFocusGroup,
10+
onKeyPressed)
11+
import Graphics.Vty.Widgets.EventLoop (Collection, addToCollection,
12+
newCollection)
13+
import Graphics.Vty.Widgets.List (ActivateItemEvent (..),
14+
addToList, newList,
15+
onItemActivated)
16+
import Graphics.Vty.Widgets.Text (plainText)
17+
import System.Exit (exitSuccess)
18+
import Workhs.Exercise
1419

1520
mainScreen :: [Exercise] -> IO Collection
16-
mainScreen exercises = do
21+
mainScreen exercises = do
1722
title <- plainText "tutorial title"
1823
list <- newList 1
1924
ui <- vBox title list

stack.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# For more information, see: https://github.com/commercialhaskell/stack/blob/release/doc/yaml_configuration.md
2+
3+
# Specifies the GHC version and set of packages available (e.g., lts-3.5, nightly-2015-09-21, ghc-7.10.2)
4+
resolver: lts-3.18
5+
6+
# Local packages, usually specified by relative directory name
7+
packages:
8+
- '.'
9+
10+
# Packages to be pulled from upstream that are not in the resolver (e.g., acme-missiles-0.3)
11+
extra-deps: []
12+
13+
# Override default flag values for local packages and extra-deps
14+
flags: {}
15+
16+
# Extra package databases containing global packages
17+
extra-package-dbs: []
18+
19+
# Control whether we use the GHC we find on the path
20+
# system-ghc: true
21+
22+
# Require a specific version of stack, using version ranges
23+
# require-stack-version: -any # Default
24+
# require-stack-version: >= 0.1.10.0
25+
26+
# Override the architecture used by stack, especially useful on Windows
27+
# arch: i386
28+
# arch: x86_64
29+
30+
# Extra directories used by stack for building
31+
# extra-include-dirs: [/path/to/dir]
32+
# extra-lib-dirs: [/path/to/dir]

engager.cabal renamed to workhs.cabal

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: engager
22
version: 0.1.0.0
3-
license: GPL-3
3+
license: MIT
44
license-file: LICENSE
55
build-type: Simple
66
cabal-version: >=1.18
77

88
library
9-
exposed-modules: Engager.Core
10-
, Engager.Exercise
11-
other-modules: Engager.Interface
9+
exposed-modules: Workhs.Core
10+
, Workhs.Exercise
11+
other-modules: Workhs.Interface
1212
build-depends: base >=4.7 && <4.8
1313
, text >=1.2 && <1.3
1414
, vty-ui >=1.8 && <1.9

0 commit comments

Comments
 (0)