diff options
author | 2009-12-13 14:20:41 -0500 | |
---|---|---|
committer | 2009-12-13 14:20:41 -0500 | |
commit | f5449b93792afc81e4da70d2a790ef7a2d2b49d5 (patch) | |
tree | 14b2deefac4e078e2d5e4e5bdd076749de8659d8 /src/core_util.sml | |
parent | 2319f2ff07432849cc88956ad92467edd2e8bf5e (diff) |
Initializers and setval
Diffstat (limited to 'src/core_util.sml')
-rw-r--r-- | src/core_util.sml | 8 |
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 |