diff options
author | 2008-06-10 15:56:33 -0400 | |
---|---|---|
committer | 2008-06-10 15:56:33 -0400 | |
commit | 0b48781249e7062928ff78ae3469a508a3e31eaa (patch) | |
tree | 9e6bdf99508109633f198c8a01948c165cad3b86 /src/elab_util.sml | |
parent | be45a4a950e01689219ebc5032f53f66b012f660 (diff) |
Closure conversion
Diffstat (limited to 'src/elab_util.sml')
-rw-r--r-- | src/elab_util.sml | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/elab_util.sml b/src/elab_util.sml index db444f82..1f204dce 100644 --- a/src/elab_util.sml +++ b/src/elab_util.sml @@ -214,13 +214,15 @@ 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, fn e' => |