# HG changeset patch # User Adam Chlipala # Date 1216308007 14400 # Node ID 96bd3350e77d757c7052a69fa4ceb42485db0c38 # Parent 78d59cf0a0cce053a0a62f675954b02a708de5ae Compiled mutual 'val rec' diff -r 78d59cf0a0cc -r 96bd3350e77d src/corify.sml --- 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 diff -r 78d59cf0a0cc -r 96bd3350e77d tests/rec.lac --- a/tests/rec.lac Thu Jul 17 11:02:10 2008 -0400 +++ b/tests/rec.lac Thu Jul 17 11:20:07 2008 -0400 @@ -1,3 +1,3 @@ -val rec looper = fn () => - Ride again! +val rec main = fn () => + Ride again! diff -r 78d59cf0a0cc -r 96bd3350e77d tests/rec2.lac --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/rec2.lac Thu Jul 17 11:20:07 2008 -0400 @@ -0,0 +1,7 @@ +val rec main = fn () => + See another page + + +and aux = fn () => + Back to square one +