module Main where import Parser import Evaluator import System.Console.Haskeline main :: IO () main = runInputT defaultSettings repl where repl = do line <- getInputLine "picolisp> " case line of Nothing -> return () Just s -> do let eithE = parseExpression s case eithE of Left err -> do outputStrLn $ show err repl Right e -> do outputStrLn . show $ eval e repl