Mercurial > urweb
diff src/corify.sml @ 130:96bd3350e77d
Compiled mutual 'val rec'
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 17 Jul 2008 11:20:07 -0400 |
parents | fd98dd10dce7 |
children | adfa2c7a75da |
line wrap: on
line diff
--- a/src/corify.sml Thu Jul 17 11:02:10 2008 -0400 +++ b/src/corify.sml Thu Jul 17 11:20:07 2008 -0400 @@ -387,18 +387,26 @@ | 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