git @ Cat's Eye Technologies ZOWIE / implement-in-haskell
Clean up Main.hs. Chris Pressey 5 months ago
1 changed file(s) with 3 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
1616 return ()
1717 ["run", fileName] -> do
1818 prog <- loadSource fileName
19 result <- Machine.loadAndRun prog
20 -- putStrLn $ show $ result
19 Machine.loadAndRun prog
2120 return ()
2221 _ -> do
23 abortWith "Usage: zowie (parse|run) <zowie-program-filename>"
22 abortWith "Usage: zowie-hs (parse|run) <zowie-program-filename>"
2423
2524 loadSource fileName = do
2625 text <- readFile fileName
3231
3332 abortWith msg = do
3433 hPutStrLn stderr msg
35 exitWith (ExitFailure 1)
34 exitWith $ ExitFailure 1