perga/app/Main.hs

20 lines
474 B
Haskell

module Main where
import Expr
import Parser
import System.IO
-- import Check
main :: IO ()
main = do
_ <- putStr "> "
_ <- hFlush stdout
input <- getLine
case pAll input of
Left err -> putStrLn err
Right expr -> putStrLn (pretty expr)
-- Right expr -> case findType [] expr of
-- Just ty -> putStrLn $ pretty expr ++ " : " ++ pretty ty
-- Nothing -> putStrLn $ "Unable to find type for " ++ pretty expr ++ "!"
main