diff options
author | Jed Barber <jjbarber@y7mail.com> | 2014-04-10 05:25:03 +1000 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2014-04-10 05:25:03 +1000 |
commit | 281425310c5db21f87981eeb9601a71d1974d98d (patch) | |
tree | bef4643d906c93622c311fef2cf758fe94f1f651 /thue.hs | |
parent | e8695600977769008f285f9958eb043cca1b9b29 (diff) |
Rearranging files
Diffstat (limited to 'thue.hs')
-rw-r--r-- | thue.hs | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/thue.hs b/thue.hs deleted file mode 100644 index 89afcc3..0000000 --- a/thue.hs +++ /dev/null @@ -1,30 +0,0 @@ - -import System.Environment( getArgs ) -import Control.Exception( ErrorCall(..), Handler(..), catches ) -import Thue.Parser -import Thue.Interpreter - - - - -usageString :: String -usageString = "Usage: thue <program file>" - - - -program :: IO () -program = do - args <- getArgs - fileContents <- if (length args /= 1) - then error usageString - else readFile (head args) - - case (parseThue fileContents) of - Left x -> putStrLn (show x) - Right x -> (thue x) >>= (putStrLn . show) - - - -main = catches program - [ Handler ((\e -> putStrLn . show $ e) :: ErrorCall -> IO ()) ] - |