X-Git-Url: https://git.lukelau.me/?p=kaleidoscope-hs.git;a=blobdiff_plain;f=Main.hs;h=ec0de8c8bcfd731b298ed5a09c5df8784e9f0fd3;hp=76a9bdb5d48831da2e59c811ecbcbb5a379bdfb5;hb=3ccccc6ab809fb87dd929855936895fb11479e27;hpb=0daa38ae816488b94b57154c11a7bff5d376a28d diff --git a/Main.hs b/Main.hs index 76a9bdb..ec0de8c 100644 --- a/Main.hs +++ b/Main.hs @@ -1 +1,10 @@ -main = pure () +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