comparison 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
comparison
equal deleted inserted replaced
129:78d59cf0a0cc 130:96bd3350e77d
385 ([(L'.DVal (x, n, corifyCon st t, corifyExp st e, s), loc)], st) 385 ([(L'.DVal (x, n, corifyCon st t, corifyExp st e, s), loc)], st)
386 end 386 end
387 | L.DValRec vis => 387 | L.DValRec vis =>
388 let 388 let
389 val (vis, st) = ListUtil.foldlMap 389 val (vis, st) = ListUtil.foldlMap
390 (fn ((x, n, t, e), st) => 390 (fn ((x, n, t, e), st) =>
391 let 391 let
392 val (st, n) = St.bindVal st x n 392 val (st, n) = St.bindVal st x n
393 val s = 393 in
394 if String.isPrefix "wrap_" x then 394 ((x, n, t, e), st)
395 String.extract (x, 5, NONE) 395 end)
396 else 396 st vis
397 x 397
398 in 398 val vis = map
399 ((x, n, corifyCon st t, corifyExp st e, s), st) 399 (fn (x, n, t, e) =>
400 end) 400 let
401 st vis 401 val s =
402 if String.isPrefix "wrap_" x then
403 String.extract (x, 5, NONE)
404 else
405 x
406 in
407 (x, n, corifyCon st t, corifyExp st e, s)
408 end)
409 vis
402 in 410 in
403 ([(L'.DValRec vis, loc)], st) 411 ([(L'.DValRec vis, loc)], st)
404 end 412 end
405 | L.DSgn _ => ([], st) 413 | L.DSgn _ => ([], st)
406 414