diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-11-01 16:08:39 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-11-01 16:08:39 -0400 |
commit | bcacd9c7aca307547ebff8dc7038b6f78156b507 (patch) | |
tree | a5de853eb5ae1e922b58be100773706ac20e0311 /src/explify.sml | |
parent | 6578fad1ed0871839d4b99a40cd626d4f39bf162 (diff) |
Explify 'let'
Diffstat (limited to 'src/explify.sml')
-rw-r--r-- | src/explify.sml | 7 |
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) |