Tests and better default REPL behavior

This commit is contained in:
James Eversole
2024-12-27 14:10:13 -06:00
parent dbb5227fbc
commit 4495f8eba0
5 changed files with 106 additions and 92 deletions

View File

@ -16,6 +16,10 @@ repl env = do
input <- getLine
if input == "_:exit"
then putStrLn "Goodbye!"
else if input == ""
then do
putStrLn ""
repl env
else do
let clearEnv = Map.delete "__result" env
let newEnv = evalSingle clearEnv (parseSingle input)