diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-06-10 15:56:33 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-06-10 15:56:33 -0400 |
commit | 0b48781249e7062928ff78ae3469a508a3e31eaa (patch) | |
tree | 9e6bdf99508109633f198c8a01948c165cad3b86 /src/core_util.sml | |
parent | be45a4a950e01689219ebc5032f53f66b012f660 (diff) |
Closure conversion
Diffstat (limited to 'src/core_util.sml')
-rw-r--r-- | src/core_util.sml | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core_util.sml b/src/core_util.sml index 549f7d1f..a9d022b6 100644 --- a/src/core_util.sml +++ b/src/core_util.sml @@ -222,12 +222,14 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, bind} = S.map2 (mfe ctx e2, fn e2' => (EApp (e1', e2'), loc))) - | EAbs (x, t, e) => - S.bind2 (mfc ctx t, - fn t' => - S.map2 (mfe (bind (ctx, RelE (x, t))) e, - fn e' => - (EAbs (x, t', e'), loc))) + | EAbs (x, dom, ran, e) => + S.bind2 (mfc ctx dom, + fn dom' => + S.bind2 (mfc ctx ran, + fn ran' => + S.map2 (mfe (bind (ctx, RelE (x, dom'))) e, + fn e' => + (EAbs (x, dom', ran', e'), loc)))) | ECApp (e, c) => S.bind2 (mfe ctx e, |