aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Eval.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Eval.hs')
-rw-r--r--src/Eval.hs15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/Eval.hs b/src/Eval.hs
index d887a62..6af1959 100644
--- a/src/Eval.hs
+++ b/src/Eval.hs
@@ -285,10 +285,23 @@ evalCommand inp s@(EnvState env@(Environment envDefs) conf cache) = \case
case res of
Left err -> print err
Right e' -> do
- red <- reduce e'
putStrLn $ toBinary e'
+ red <- reduce e'
putStrLn $ toBinary red
pure s
+ Jot str -> do
+ let e = fromJot str
+ let (res, _) = evalExp e (Environment M.empty) `runState` env
+ case res of
+ Left err -> print err
+ Right e' -> do
+ print e
+ print e'
+ print $ length $ toBinary e'
+ red <- reduce e'
+ print red
+ print $ length $ toBinary red
+ pure s
Time e -> do
start <- getTime Monotonic
let (res, _) = evalExp e (Environment M.empty) `runState` env