Strict evaluation when evaluating single variables

This commit is contained in:
Ivy 2021-01-30 00:43:52 +01:00
parent cde29b7fcc
commit 2a351374a7
1 changed files with 2 additions and 2 deletions

View File

@ -15,8 +15,8 @@ base = M.fromList [
eval :: Env -> Expr -> (Env, Expr) eval :: Env -> Expr -> (Env, Expr)
eval env (IntE x) = (env, IntE x) eval env (IntE x) = (env, IntE x)
eval env (VarE v) = (env, env M.! v) eval env (VarE v) = eval env $ env M.! v
eval env (SetE v expr) = (M.insert v expr env, NilE) eval env (SetE v expr) = (M.insert v expr env, expr)
eval env NilE = (env, NilE) eval env NilE = (env, NilE)
--apply :: Proc -> Args -> Expr --apply :: Proc -> Args -> Expr