summaryrefslogtreecommitdiff
path: root/src/core_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/core_util.sml
parentbaa7f87fc4cb1d22eed66ff41a61e9525e0477e2 (diff)
page declaration, up through monoize
Diffstat (limited to 'src/core_util.sml')
-rw-r--r--src/core_util.sml14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/core_util.sml b/src/core_util.sml
index f0a37356..d65f0b87 100644
--- a/src/core_util.sml
+++ b/src/core_util.sml
@@ -376,6 +376,12 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, decl = fd, bind} =
S.map2 (mfe ctx e,
fn e' =>
(DVal (x, n, t', e'), loc)))
+ | DPage (c, e) =>
+ S.bind2 (mfc ctx c,
+ fn c' =>
+ S.map2 (mfe ctx e,
+ fn e' =>
+ (DPage (c', e'), loc)))
in
mfd
end
@@ -412,11 +418,11 @@ fun mapfoldB (all as {bind, ...}) =
S.bind2 (mfd ctx d,
fn d' =>
let
- val b =
+ val ctx' =
case #1 d' of
- DCon (x, n, k, c) => NamedC (x, n, k, SOME c)
- | DVal (x, n, t, e) => NamedE (x, n, t, SOME e)
- val ctx' = bind (ctx, b)
+ DCon (x, n, k, c) => bind (ctx, NamedC (x, n, k, SOME c))
+ | DVal (x, n, t, e) => bind (ctx, NamedE (x, n, t, SOME e))
+ | DPage _ => ctx
in
S.map2 (mff ctx' ds',
fn ds' =>