Skip to content

Commit

Permalink
fix: main does not stop at syntax error
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur-Aillet committed Oct 11, 2023
1 parent 37e8ff9 commit 5ff6ee0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 5ff6ee0

Please sign in to comment.