summaryrefslogtreecommitdiff
path: root/src/explify.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-11-01 16:08:39 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-11-01 16:08:39 -0400
commit1145290f6ac5b13fe94772c692caa3cdb55bbf5f (patch)
treea5de853eb5ae1e922b58be100773706ac20e0311 /src/explify.sml
parentcfb8ffaf94885d8dc1b492a050830a9b4ffc3d04 (diff)
Explify 'let'
Diffstat (limited to 'src/explify.sml')
-rw-r--r--src/explify.sml7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/explify.sml b/src/explify.sml
index 1bca49c3..e19bb200 100644
--- a/src/explify.sml
+++ b/src/explify.sml
@@ -116,6 +116,13 @@ fun explifyExp (e, loc) =
| 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)