summaryrefslogtreecommitdiff
path: root/src/corify.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-07-17 11:20:07 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-07-17 11:20:07 -0400
commitd5fd0e7403767670197f0422c99ba62176323624 (patch)
treeed1ba9e135ca409c2464256429a62cd9b4bd34f4 /src/corify.sml
parentf97f99744f08737c22c83d17b77449c78213b3f8 (diff)
Compiled mutual 'val rec'
Diffstat (limited to 'src/corify.sml')
-rw-r--r--src/corify.sml32
1 files changed, 20 insertions, 12 deletions
diff --git a/src/corify.sml b/src/corify.sml
index 41b0e825..13db0685 100644
--- a/src/corify.sml
+++ b/src/corify.sml
@@ -387,18 +387,26 @@ fun corifyDecl ((d, loc : EM.span), st) =
| L.DValRec vis =>
let
val (vis, st) = ListUtil.foldlMap
- (fn ((x, n, t, e), st) =>
- let
- val (st, n) = St.bindVal st x n
- val s =
- if String.isPrefix "wrap_" x then
- String.extract (x, 5, NONE)
- else
- x
- in
- ((x, n, corifyCon st t, corifyExp st e, s), st)
- end)
- st vis
+ (fn ((x, n, t, e), st) =>
+ let
+ val (st, n) = St.bindVal st x n
+ in
+ ((x, n, t, e), st)
+ end)
+ st vis
+
+ val vis = map
+ (fn (x, n, t, e) =>
+ let
+ val s =
+ if String.isPrefix "wrap_" x then
+ String.extract (x, 5, NONE)
+ else
+ x
+ in
+ (x, n, corifyCon st t, corifyExp st e, s)
+ end)
+ vis
in
([(L'.DValRec vis, loc)], st)
end