aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/elab_util.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-12-13 14:20:41 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-12-13 14:20:41 -0500
commitb225596addee1a3cfd6c3189cff923e7f0e8f7c9 (patch)
tree14b2deefac4e078e2d5e4e5bdd076749de8659d8 /src/elab_util.sml
parent1063981355a5a041793c095c6fd89b91fa0bd579 (diff)
Initializers and setval
Diffstat (limited to 'src/elab_util.sml')
-rw-r--r--src/elab_util.sml8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/elab_util.sml b/src/elab_util.sml
index e7985026..2a044e71 100644
--- a/src/elab_util.sml
+++ b/src/elab_util.sml
@@ -853,7 +853,8 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, sgn_item = fsgi, sgn = fsg, str = f
bind (ctx, NamedE (x, (CApp ((CModProj (n, [], "cookie"), loc),
c), loc)))
| DStyle (tn, x, n) =>
- bind (ctx, NamedE (x, (CModProj (n, [], "css_class"), loc))),
+ bind (ctx, NamedE (x, (CModProj (n, [], "css_class"), loc)))
+ | DInitializer _ => ctx,
mfd ctx d)) ctx ds,
fn ds' => (StrConst ds', loc))
| StrVar _ => S.return2 strAll
@@ -978,6 +979,10 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, sgn_item = fsgi, sgn = fsg, str = f
fn c' =>
(DCookie (tn, x, n, c'), loc))
| DStyle _ => S.return2 dAll
+ | DInitializer e =>
+ S.map2 (mfe ctx e,
+ fn e' =>
+ (DInitializer e', loc))
and mfvi ctx (x, n, c, e) =
S.bind2 (mfc ctx c,
@@ -1120,6 +1125,7 @@ and maxNameDecl (d, _) =
| DDatabase _ => 0
| DCookie (n1, _, n2, _) => Int.max (n1, n2)
| DStyle (n1, _, n2) => Int.max (n1, n2)
+ | DInitializer _ => 0
and maxNameStr (str, _) =
case str of
StrConst ds => maxName ds