diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-06-13 15:42:24 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-06-13 15:42:24 -0400 |
commit | c23f27988ff76b4923a63ced2452c4fd7787a745 (patch) | |
tree | fd3763788e9a011e6a90096de94999d80c00c9ec /src/mono_reduce.sml | |
parent | ba3e01e524907d85f5cba6af62083fcdee606f33 (diff) |
Fix MonoReduce unsoundness with lets and fns
Diffstat (limited to 'src/mono_reduce.sml')
-rw-r--r-- | src/mono_reduce.sml | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mono_reduce.sml b/src/mono_reduce.sml index 1ea3df36..4bbb430d 100644 --- a/src/mono_reduce.sml +++ b/src/mono_reduce.sml @@ -461,11 +461,10 @@ fun reduce file = (EApp (b, liftExpInExp 0 e'), loc)), loc)) | ELet (x, t, e', (EAbs (x', t' as (TRecord [], _), ran, e''), loc)) => - (*if impure e' then - e - else*) - (* Seems unsound in general without the check... should revisit later *) - EAbs (x', t', ran, (ELet (x, t, liftExpInExp 0 e', swapExpVars 0 e''), loc)) + if impure e' then + e + else + EAbs (x', t', ran, (ELet (x, t, liftExpInExp 0 e', swapExpVars 0 e''), loc)) | ELet (x, t, e', b) => let |