Strict evaluation when evaluating single variables
This commit is contained in:
parent
cde29b7fcc
commit
2a351374a7
|
@ -15,8 +15,8 @@ base = M.fromList [
|
|||
|
||||
eval :: Env -> Expr -> (Env, Expr)
|
||||
eval env (IntE x) = (env, IntE x)
|
||||
eval env (VarE v) = (env, env M.! v)
|
||||
eval env (SetE v expr) = (M.insert v expr env, NilE)
|
||||
eval env (VarE v) = eval env $ env M.! v
|
||||
eval env (SetE v expr) = (M.insert v expr env, expr)
|
||||
eval env NilE = (env, NilE)
|
||||
|
||||
--apply :: Proc -> Args -> Expr
|
||||
|
|
Loading…
Reference in New Issue