summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
0daa38a)
For the moment this doesn't have any parsing errors other than "Couldn't
parse". We'll go back to this later!
Also note we're printing to stderr.
+import AST
+import System.IO
+import Text.Read
+main = do
+ hPutStr stderr "ready> "
+ ast <- (readMaybe <$> getLine) :: IO (Maybe AST)
+ case ast of
+ Just x -> hPrint stderr x
+ Nothing -> hPutStrLn stderr "Couldn't parse"
+ main