Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e7de167398
Fetching contributors…

Cannot retrieve contributors at this time

20 lines (18 sloc) 0.507 kb
module Main where
import System.Environment
import System.Exit
import Parse
import Parsec
main = do
args <- getArgs
s <- if null args
then getContents
else readFile (head args)
let program_and_state = do
p <- program
s <- getState
return (p,s)
let res = parse program_and_state (if null args then "" else head args) s
case res of
Right s -> do print s; exitWith ExitSuccess
Left m -> do print m; exitFailure
Jump to Line
Something went wrong with that request. Please try again.