diff src/elaborate.sml @ 26:4ab19c19665f

Closure conversion
author Adam Chlipala <adamc@hcoop.net>
date Tue, 10 Jun 2008 15:56:33 -0400
parents 9a578171de9e
children 537db4ee89f4
line wrap: on
line diff
--- a/src/elaborate.sml	Tue Jun 10 13:14:45 2008 -0400
+++ b/src/elaborate.sml	Tue Jun 10 15:56:33 2008 -0400
@@ -697,7 +697,7 @@
         (case #1 (typeof env e1) of
              L'.TFun (_, c) => c
            | _ => raise Fail "typeof: Bad EApp")
-      | L'.EAbs (x, t, e1) => (L'.TFun (t, typeof (E.pushERel env x t) e1), loc)
+      | L'.EAbs (_, _, ran, _) => ran
       | L'.ECApp (e1, c) =>
         (case #1 (typeof env e1) of
              L'.TCFun (_, _, _, c1) => subConInCon (0, c) c1
@@ -771,7 +771,7 @@
                          end
             val (e', et) = elabExp (E.pushERel env x t') e
         in
-            ((L'.EAbs (x, t', e'), loc),
+            ((L'.EAbs (x, t', et, e'), loc),
              (L'.TFun (t', et), loc))
         end
       | L.ECApp (e, c) =>