Skip to content

Commit

Permalink
v2.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
yangky11 committed Oct 13, 2024
1 parent ab13370 commit b832856
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/lean_dojo/interaction/Lean4Repl.lean
Original file line number Diff line number Diff line change
Expand Up @@ -248,9 +248,9 @@ end TacticRepl


private def loop (m : TypeType) [Monad m] [MonadLift IO m] [MonadError m] (handler : Request → m Response) : m Unit := do
while true do
let line ← (← IO.getStdin).getLine
if line.trim == "exit" then
while true do
let line := (← (← IO.getStdin).getLine).trim
if line == "exit" then
break
match (Json.parse line) with
| .error err => throwError s!"[fatal] failed to parse JSON {err}"
Expand Down
2 changes: 1 addition & 1 deletion src/lean_dojo/interaction/dojo.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def _check_alive(self) -> None:
if exit_code == 137:
raise DojoCrashError("OOM")
else:
raise DojoCrashError(f"Unknown exit code: {exit_code}")
raise DojoCrashError(f"Unexpected exit code: {exit_code}")

def _read_next_line(self) -> Tuple[str, str]:
"""Read the next line from `self.proc`.
Expand Down

0 comments on commit b832856

Please sign in to comment.