aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/mono_util.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-07-10 10:11:35 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-07-10 10:11:35 -0400
commit768dfadfe4717b0c3f7b207a4980c78288b44a93 (patch)
treed927ffb9ed326f5f978ef15d1157f99239fcfb0f /src/mono_util.sml
parentbaa7f87fc4cb1d22eed66ff41a61e9525e0477e2 (diff)
page declaration, up through monoize
Diffstat (limited to 'src/mono_util.sml')
-rw-r--r--src/mono_util.sml15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mono_util.sml b/src/mono_util.sml
index 54eb9be7..cde2d57a 100644
--- a/src/mono_util.sml
+++ b/src/mono_util.sml
@@ -205,6 +205,15 @@ fun mapfoldB {typ = fc, exp = fe, decl = fd, bind} =
S.map2 (mfe ctx e,
fn e' =>
(DVal (x, n, t', 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
@@ -239,10 +248,10 @@ fun mapfoldB (all as {bind, ...}) =
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)
- val ctx' = bind (ctx, b)
+ DVal (x, n, t, e) => bind (ctx, NamedE (x, n, t, SOME e))
+ | DPage _ => ctx
in
S.map2 (mff ctx' ds',
fn ds' =>