Mercurial > urweb
comparison src/mono_reduce.sml @ 848:e8594cfa3236
Fix MonoReduce unsoundness with lets and fns
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 13 Jun 2009 15:42:24 -0400 |
parents | 20fe00fd81da |
children | 7a4b026e45dd |
comparison
equal
deleted
inserted
replaced
847:0f7e2cca6d9b | 848:e8594cfa3236 |
---|---|
459 | EApp ((ELet (x, t, e, b), loc), e') => | 459 | EApp ((ELet (x, t, e, b), loc), e') => |
460 #1 (reduceExp env (ELet (x, t, e, | 460 #1 (reduceExp env (ELet (x, t, e, |
461 (EApp (b, liftExpInExp 0 e'), loc)), loc)) | 461 (EApp (b, liftExpInExp 0 e'), loc)), loc)) |
462 | 462 |
463 | ELet (x, t, e', (EAbs (x', t' as (TRecord [], _), ran, e''), loc)) => | 463 | ELet (x, t, e', (EAbs (x', t' as (TRecord [], _), ran, e''), loc)) => |
464 (*if impure e' then | 464 if impure e' then |
465 e | 465 e |
466 else*) | 466 else |
467 (* Seems unsound in general without the check... should revisit later *) | 467 EAbs (x', t', ran, (ELet (x, t, liftExpInExp 0 e', swapExpVars 0 e''), loc)) |
468 EAbs (x', t', ran, (ELet (x, t, liftExpInExp 0 e', swapExpVars 0 e''), loc)) | |
469 | 468 |
470 | ELet (x, t, e', b) => | 469 | ELet (x, t, e', b) => |
471 let | 470 let |
472 fun doSub () = | 471 fun doSub () = |
473 let | 472 let |