summaryrefslogtreecommitdiff
path: root/lambda-calcul/haskell/src/Minilang/REPL.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lambda-calcul/haskell/src/Minilang/REPL.hs')
-rw-r--r--lambda-calcul/haskell/src/Minilang/REPL.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/lambda-calcul/haskell/src/Minilang/REPL.hs b/lambda-calcul/haskell/src/Minilang/REPL.hs
index ae25822..a8d3c77 100644
--- a/lambda-calcul/haskell/src/Minilang/REPL.hs
+++ b/lambda-calcul/haskell/src/Minilang/REPL.hs
@@ -52,15 +52,15 @@ withHandles hin hout =
-- | Simple IO REPL, used to evaluate programs from stdin or file loading
withIO :: Handle -> Handle -> IO ()
withIO hin hout = do
- input <- parseProgram <$> Text.hGetContents hin
- case input of
+ programText <- parseProgram <$> Text.hGetContents hin
+ case programText of
Left err -> Text.hPutStrLn hout (Text.pack (show err))
- Right inputs -> case loadProgram Untyped newEnv newContext inputs of
+ Right prog -> case loadProgram Untyped newEnv newContext prog of
Right (results, _, _) -> mapM_ (Text.hPutStrLn hout . render) results
Left err -> Text.hPutStrLn hout (Text.pack $ show err)
where
render :: (Term, Type) -> Text
- render (term, typ) = pretty (resugar term) <> " : " <> Unify.pretty typ
+ render (term, _typ) = pretty (resugar term) -- TODO: handle types <> " : " <> Unify.pretty typ
-- * Pure REPL