diff options
author | Akshay <[email protected]> | 2020-10-16 14:26:13 +0100 |
---|---|---|
committer | Akshay <[email protected]> | 2020-10-16 14:26:13 +0100 |
commit | 55065d6f67cf4b2f0bfaae19b38157a4ca934a62 (patch) | |
tree | d4e355d348f0470c4c37f5286790b47b98aacb9a | |
parent | b19a4a35db4cd951c52e179f3340518c9e2dcc1e (diff) |
fix: pretty print errors
-rw-r--r-- | bin/Main.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/Main.hs b/bin/Main.hs index 56ad0cd..c66d328 100644 --- a/bin/Main.hs +++ b/bin/Main.hs | |||
@@ -24,14 +24,14 @@ evalExpr env inp = runExceptT $ fmap show $ | |||
24 | 24 | ||
25 | repl :: Env -> IO () | 25 | repl :: Env -> IO () |
26 | repl env = do | 26 | repl env = do |
27 | let pp = showError defaults "(lisk-repl)" | 27 | let pp = showError defaults |
28 | inp <- readline "† " | 28 | inp <- readline "† " |
29 | case inp of | 29 | case inp of |
30 | Nothing -> return () | 30 | Nothing -> return () |
31 | Just ",q" -> return () | 31 | Just ",q" -> return () |
32 | Just i -> do | 32 | Just i -> do |
33 | out <- evalExpr env i | 33 | out <- evalExpr env i |
34 | either (putStrLn . pp) putStrLn out | 34 | either (putStrLn . pp i) putStrLn out |
35 | repl env | 35 | repl env |
36 | 36 | ||
37 | 37 | ||