From 5ff6ee03c140544f59f8033de95c62ced111a14e Mon Sep 17 00:00:00 2001 From: Arthur-Aillet Date: Wed, 11 Oct 2023 13:46:45 +0200 Subject: [PATCH] fix: main does not stop at syntax error --- app/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Main.hs b/app/Main.hs index 4cfe301..da0a4c6 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -69,7 +69,7 @@ getInstructions :: Context -> IO () getInstructions (context, depth) = do new_line <- runInputT (newSettings (context, depth)) haskelineGetline case runParser (parseManyValidOrEmpty parseSExpr) new_line defaultPosition of - Left err -> liftIO (printErr err) >> liftIO (exitWith (ExitFailure 84)) + Left err -> liftIO (printErr err) >> getInstructions (context, depth) Right (sexpr, _, _) -> do new_context <- liftIO (loopOnCommands (context, depth) sexpr)