Mercurial > urweb
diff src/corify.sml @ 124:541282b81454
Explifying (non-mutual) 'val rec'
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 17 Jul 2008 10:13:18 -0400 |
parents | 2d6116de9cca |
children | fd98dd10dce7 |
line wrap: on
line diff
--- a/src/corify.sml Thu Jul 17 10:09:34 2008 -0400 +++ b/src/corify.sml Thu Jul 17 10:13:18 2008 -0400 @@ -384,6 +384,7 @@ 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 @@ 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')