summaryrefslogtreecommitdiff
path: root/src/core_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/core_util.sml
parent1063981355a5a041793c095c6fd89b91fa0bd579 (diff)
Initializers and setval
Diffstat (limited to 'src/core_util.sml')
-rw-r--r--src/core_util.sml8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/core_util.sml b/src/core_util.sml
index cedde841..7ead1157 100644
--- a/src/core_util.sml
+++ b/src/core_util.sml
@@ -971,6 +971,10 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, decl = fd, bind} =
fn c' =>
(DCookie (x, n, c', s), loc))
| DStyle _ => S.return2 dAll
+ | DInitializer e =>
+ S.map2 (mfe ctx e,
+ fn e' =>
+ (DInitializer e', loc))
and mfvi ctx (x, n, t, e, s) =
S.bind2 (mfc ctx t,
@@ -1125,6 +1129,7 @@ fun mapfoldB (all as {bind, ...}) =
in
bind (ctx, NamedE (x, n, t, NONE, s))
end
+ | DInitializer _ => ctx
in
S.map2 (mff ctx' ds',
fn ds' =>
@@ -1187,7 +1192,8 @@ val maxName = foldl (fn ((d, _) : decl, count) =>
| DView (_, n, _, _, _) => Int.max (n, count)
| DDatabase _ => count
| DCookie (_, n, _, _) => Int.max (n, count)
- | DStyle (_, n, _) => Int.max (n, count)) 0
+ | DStyle (_, n, _) => Int.max (n, count)
+ | DInitializer _ => count) 0
end