Mercurial > urweb
diff src/flat_util.sml @ 101:717b6f8d8505
First executable generated
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 10 Jul 2008 11:13:49 -0400 |
parents | 5182f0c80d2e |
children | 5f04adf47f48 |
line wrap: on
line diff
--- a/src/flat_util.sml Thu Jul 10 10:11:35 2008 -0400 +++ b/src/flat_util.sml Thu Jul 10 11:13:49 2008 -0400 @@ -270,6 +270,15 @@ S.map2 (mfe ctx e, fn e' => (DFun (n, x, dom', ran', e'), loc)))) + | DPage (xts, e) => + S.bind2 (ListUtil.mapfold (fn (x, t) => + S.map2 (mft t, + fn t' => + (x, t'))) xts, + fn xts' => + S.map2 (mfe ctx e, + fn e' => + (DPage (xts', e'), loc))) in mfd end @@ -308,11 +317,11 @@ S.bind2 (mfd ctx d, fn d' => let - val b = + val ctx' = case #1 d' of - DVal (x, n, t, e) => NamedE (x, n, t, SOME e) - | DFun v => F v - val ctx' = bind (ctx, b) + DVal (x, n, t, e) => bind (ctx, NamedE (x, n, t, SOME e)) + | DFun v => bind (ctx, F v) + | DPage _ => ctx in S.map2 (mff ctx' ds', fn ds' =>