aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Eval.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Eval.hs')
-rw-r--r--src/Eval.hs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/Eval.hs b/src/Eval.hs
index c40a118..47ca4ca 100644
--- a/src/Eval.hs
+++ b/src/Eval.hs
@@ -78,8 +78,16 @@ evalRepl line env = case parse parseReplLine "REPL" line of
let (res, env') = evalExp exp `runState` env
in outputStrLn
(case res of
- Left err -> show err
- Right exp -> (show exp) <> "\n-> " <> (show $ reduce exp)
+ Left err -> show err
+ Right exp ->
+ "<> "
+ <> (show exp)
+ <> "\n*> "
+ <> (show reduced)
+ <> "\t("
+ <> (show $ ternaryToDecimal reduced)
+ <> ")"
+ where reduced = reduce exp
)
>> pure env
Load path ->