-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored some code, added makefile
- Loading branch information
Kelong Cong
committed
Nov 13, 2013
1 parent
f2a75b1
commit b6f4a21
Showing
5 changed files
with
36 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,7 @@ | ||
dist | ||
cabal-dev | ||
main | ||
Main | ||
*.o | ||
*.hi | ||
*.chi | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
|
||
import Enigma | ||
|
||
myconf :: Conf | ||
myconf = Conf plugs ref_b [rtypeI,rtypeII,rtypeIII] ['A','A','A'] | ||
mystate :: State | ||
mystate = ['A','A','A'] | ||
|
||
run :: String -> String | ||
run = enigma myconf mystate | ||
|
||
main :: IO () | ||
main = do | ||
msg <- getLine | ||
putStrLn (run msg) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
all: | ||
ghc -Wall Main.hs | ||
clean: | ||
rm -rf *.o *.hi Main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters