summaryrefslogtreecommitdiff
path: root/src/core_util.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-12-15 10:19:05 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-12-15 10:19:05 -0500
commit6179a09d47c5af4db1ac41d00b8cb7ec36741c3e (patch)
tree0912963011416a0f1132c07d44c3eca8b6545d54 /src/core_util.sml
parent1589307fcb887ec55b5baea7445747b479a665d2 (diff)
Convert to task syntax
Diffstat (limited to 'src/core_util.sml')
-rw-r--r--src/core_util.sml14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/core_util.sml b/src/core_util.sml
index 7ead1157..599e1abc 100644
--- a/src/core_util.sml
+++ b/src/core_util.sml
@@ -971,10 +971,12 @@ 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))
+ | DTask (e1, e2) =>
+ S.bind2 (mfe ctx e1,
+ fn e1' =>
+ S.map2 (mfe ctx e2,
+ fn e2' =>
+ (DTask (e1', e2'), loc)))
and mfvi ctx (x, n, t, e, s) =
S.bind2 (mfc ctx t,
@@ -1129,7 +1131,7 @@ fun mapfoldB (all as {bind, ...}) =
in
bind (ctx, NamedE (x, n, t, NONE, s))
end
- | DInitializer _ => ctx
+ | DTask _ => ctx
in
S.map2 (mff ctx' ds',
fn ds' =>
@@ -1193,7 +1195,7 @@ val maxName = foldl (fn ((d, _) : decl, count) =>
| DDatabase _ => count
| DCookie (_, n, _, _) => Int.max (n, count)
| DStyle (_, n, _) => Int.max (n, count)
- | DInitializer _ => count) 0
+ | DTask _ => count) 0
end