From 281425310c5db21f87981eeb9601a71d1974d98d Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Thu, 10 Apr 2014 05:25:03 +1000 Subject: Rearranging files --- thue.hs | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 thue.hs (limited to 'thue.hs') 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 :: 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 ()) ] - -- cgit