diff options
author | 2009-05-14 13:18:31 -0400 | |
---|---|---|
committer | 2009-05-14 13:18:31 -0400 | |
commit | c69e0c432107906261ab4c56cd88a8cfab3191fb (patch) | |
tree | 2d38397e8bfd910828e32184e9adbda761b1ae84 /src/mono_reduce.sml | |
parent | ee2f4ffdf2f283c33fb7bb488fa88a1d9f2cf6be (diff) |
Proper lifting of MonoEnv stored expressions; avoidance of onchange clobbering
Diffstat (limited to 'src/mono_reduce.sml')
-rw-r--r-- | src/mono_reduce.sml | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/mono_reduce.sml b/src/mono_reduce.sml index 5d8afee3..5a2aca85 100644 --- a/src/mono_reduce.sml +++ b/src/mono_reduce.sml @@ -409,7 +409,15 @@ fun reduce file = case match (env, p, e') of No => search pes | Maybe => push () - | Yes env => #1 (reduceExp env body) + | Yes env' => + let + val r = reduceExp env' body + in + (*Print.prefaces "ECase" + [("body", MonoPrint.p_exp env' body), + ("r", MonoPrint.p_exp env r)];*) + #1 r + end in search pes end @@ -443,7 +451,14 @@ fun reduce file = | ELet (x, t, e', b) => let fun doSub () = - #1 (reduceExp env (subExpInExp (0, e') b)) + let + val r = subExpInExp (0, e') b + in + (*Print.prefaces "doSub" [("e'", MonoPrint.p_exp env e'), + ("b", MonoPrint.p_exp (E.pushERel env x t NONE) b), + ("r", MonoPrint.p_exp env r)];*) + #1 (reduceExp env r) + end fun trySub () = case t of |