perga/app/Main.hs

21 lines
474 B
Haskell
Raw Normal View History

2024-10-05 13:31:09 -07:00
module Main where
2024-10-06 14:02:35 -07:00
import Expr
2024-10-05 16:04:13 -07:00
import Parser
import System.IO
2024-11-11 14:34:55 -08:00
-- import Check
2024-10-05 16:04:13 -07:00
2024-10-05 13:31:09 -07:00
main :: IO ()
2024-10-05 16:04:13 -07:00
main = do
2024-10-06 14:02:35 -07:00
_ <- putStr "> "
_ <- hFlush stdout
input <- getLine
case pAll input of
Left err -> putStrLn err
2024-11-11 14:34:55 -08:00
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 ++ "!"
2024-11-11 13:37:44 -08:00
main