projects
/
kaleidoscope-hs.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Add basic repl
[kaleidoscope-hs.git]
/
Main.hs
1
import AST
2
import System.IO
3
import Text.Read
4
main = do
5
hPutStr stderr "ready> "
6
ast <- (readMaybe <$> getLine) :: IO (Maybe AST)
7
case ast of
8
Just x -> hPrint stderr x
9
Nothing -> hPutStrLn stderr "Couldn't parse"
10
main