Removed previous buggy feature of var evaluation

This commit is contained in:
Ivy 2021-01-30 17:34:15 +01:00
parent 16e6cd8419
commit 65e4502799
1 changed files with 1 additions and 2 deletions

View File

@ -15,8 +15,7 @@ base = M.fromList [
eval :: Env -> Expr -> (Env, Expr)
eval env i@(IntE _) = (env, i)
eval env (VarE v) = (M.insert v nExpr nEnv, nExpr)
where (nEnv, nExpr) = eval 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 (QuotedE e) = (env, e)
eval env (ConsE car cdr) = (env, apply car cdr)