diff src/elab_util.sml @ 26:4ab19c19665f

Closure conversion
author Adam Chlipala <adamc@hcoop.net>
date Tue, 10 Jun 2008 15:56:33 -0400
parents f1c36df29ed7
children 537db4ee89f4
line wrap: on
line diff
--- a/src/elab_util.sml	Tue Jun 10 13:14:45 2008 -0400
+++ b/src/elab_util.sml	Tue Jun 10 15:56:33 2008 -0400
@@ -214,13 +214,15 @@
                          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' =>