Skip to content

Commit

Permalink
Pretty-print exceptions in REPL
Browse files Browse the repository at this point in the history
  • Loading branch information
jstolarek committed Feb 23, 2017
1 parent a8c9abf commit 28561d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Language/Slicer/Repl.hs
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ parseAndEvalLine line = do
(val `seq` addBinding (getVar expr) val ty)
return (It $ "val it = " ++ show (pPrint res) ++
" : " ++ show (pPrint ty))
Right (OExn val, _res, _ty, st) ->
Right (OExn _, res, _, st) ->
do setEvalState st
return (It $ "Exception: " ++ show (val))
Right (_) -> error "Unknown outcome (should be impossible)"
return (It $ "Exception: " ++ show (pPrint res))
Right _ -> error "Unknown outcome (should be impossible)"
Left err -> return (Error err)

-- Note [Handling let bindings]
Expand Down

0 comments on commit 28561d3

Please sign in to comment.