summaryrefslogtreecommitdiff
path: root/src/mono_reduce.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-06-13 15:42:24 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-06-13 15:42:24 -0400
commit9951d7544ba5deaea67864259001a21c12ff11ea (patch)
treefd3763788e9a011e6a90096de94999d80c00c9ec /src/mono_reduce.sml
parentafe50be2ed547e0b8d83200bbec77b6037334678 (diff)
Fix MonoReduce unsoundness with lets and fns
Diffstat (limited to 'src/mono_reduce.sml')
-rw-r--r--src/mono_reduce.sml9
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