diff src/explify.sml @ 449:89f766f19d5b

Explify 'let'
author Adam Chlipala <adamc@hcoop.net>
date Sat, 01 Nov 2008 16:08:39 -0400
parents dfc8c991abd0
children d34834af4512
line wrap: on
line diff
--- a/src/explify.sml	Sat Nov 01 15:58:55 2008 -0400
+++ b/src/explify.sml	Sat Nov 01 16:08:39 2008 -0400
@@ -116,6 +116,13 @@
       | L.EUnif (ref (SOME e)) => explifyExp e
       | L.EUnif _ => raise Fail ("explifyExp: Undetermined EUnif at " ^ EM.spanToString loc)
 
+      | L.ELet (des, e) =>
+        foldr (fn ((de, loc), e) =>
+                  case de of
+                      L.EDValRec _ => raise Fail "explifyExp: Local 'val rec' remains"
+                    | L.EDVal (x, t, e') => (L'.ELet (x, explifyCon t, explifyExp e', e), loc))
+        (explifyExp e) des
+
 fun explifySgi (sgi, loc) =
     case sgi of
         L.SgiConAbs (x, n, k) => SOME (L'.SgiConAbs (x, n, explifyKind k), loc)