summaryrefslogtreecommitdiff
path: root/src/corify.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-07-17 10:13:18 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-07-17 10:13:18 -0400
commit1e03bdf0b6f423870abcf5e54ae7f2bdf08e3e49 (patch)
tree39ac50f2c17e5c8068db2294a5bc3ee89e88cf1a /src/corify.sml
parentdcfd6390610712e9d498cdb4e466eb932a6bb138 (diff)
Explifying (non-mutual) 'val rec'
Diffstat (limited to 'src/corify.sml')
-rw-r--r--src/corify.sml4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/corify.sml b/src/corify.sml
index 55d9a95a..b17cad24 100644
--- a/src/corify.sml
+++ b/src/corify.sml
@@ -384,6 +384,7 @@ fun corifyDecl ((d, loc : EM.span), st) =
in
([(L'.DVal (x, n, corifyCon st t, corifyExp st e, s), loc)], st)
end
+ | L.DValRec _ => raise Fail "Explify DValRec"
| L.DSgn _ => ([], st)
@@ -531,7 +532,8 @@ and corifyStr ((str, _), st) =
fun maxName ds = foldl (fn ((d, _), n) =>
case d of
L.DCon (_, n', _, _) => Int.max (n, n')
- | L.DVal (_, n', _ , _) => Int.max (n, n')
+ | L.DVal (_, n', _, _) => Int.max (n, n')
+ | L.DValRec vis => foldl (fn ((_, n', _, _), n) => Int.max (n, n)) n vis
| L.DSgn (_, n', _) => Int.max (n, n')
| L.DStr (_, n', _, str) => Int.max (n, Int.max (n', maxNameStr str))
| L.DFfiStr (_, n', _) => Int.max (n, n')