From 28561d396d69b6d47963e3fd90e09d49db291b22 Mon Sep 17 00:00:00 2001 From: Jan Stolarek Date: Thu, 23 Feb 2017 19:42:15 +0000 Subject: [PATCH] Pretty-print exceptions in REPL --- src/Language/Slicer/Repl.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Language/Slicer/Repl.hs b/src/Language/Slicer/Repl.hs index 3266281..d124be3 100644 --- a/src/Language/Slicer/Repl.hs +++ b/src/Language/Slicer/Repl.hs @@ -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]