comparison src/core_util.sml @ 1075:0657e5adc938

Convert to task syntax
author Adam Chlipala <adamc@hcoop.net>
date Tue, 15 Dec 2009 10:19:05 -0500
parents b2311dfb3158
children 338be96f8533
comparison
equal deleted inserted replaced
1074:d89f98f0b4bb 1075:0657e5adc938
969 | DCookie (x, n, c, s) => 969 | DCookie (x, n, c, s) =>
970 S.map2 (mfc ctx c, 970 S.map2 (mfc ctx c,
971 fn c' => 971 fn c' =>
972 (DCookie (x, n, c', s), loc)) 972 (DCookie (x, n, c', s), loc))
973 | DStyle _ => S.return2 dAll 973 | DStyle _ => S.return2 dAll
974 | DInitializer e => 974 | DTask (e1, e2) =>
975 S.map2 (mfe ctx e, 975 S.bind2 (mfe ctx e1,
976 fn e' => 976 fn e1' =>
977 (DInitializer e', loc)) 977 S.map2 (mfe ctx e2,
978 fn e2' =>
979 (DTask (e1', e2'), loc)))
978 980
979 and mfvi ctx (x, n, t, e, s) = 981 and mfvi ctx (x, n, t, e, s) =
980 S.bind2 (mfc ctx t, 982 S.bind2 (mfc ctx t,
981 fn t' => 983 fn t' =>
982 S.map2 (mfe ctx e, 984 S.map2 (mfe ctx e,
1127 let 1129 let
1128 val t = (CFfi ("Basis", "css_class"), #2 d') 1130 val t = (CFfi ("Basis", "css_class"), #2 d')
1129 in 1131 in
1130 bind (ctx, NamedE (x, n, t, NONE, s)) 1132 bind (ctx, NamedE (x, n, t, NONE, s))
1131 end 1133 end
1132 | DInitializer _ => ctx 1134 | DTask _ => ctx
1133 in 1135 in
1134 S.map2 (mff ctx' ds', 1136 S.map2 (mff ctx' ds',
1135 fn ds' => 1137 fn ds' =>
1136 d' :: ds') 1138 d' :: ds')
1137 end) 1139 end)
1191 | DSequence (_, n, _) => Int.max (n, count) 1193 | DSequence (_, n, _) => Int.max (n, count)
1192 | DView (_, n, _, _, _) => Int.max (n, count) 1194 | DView (_, n, _, _, _) => Int.max (n, count)
1193 | DDatabase _ => count 1195 | DDatabase _ => count
1194 | DCookie (_, n, _, _) => Int.max (n, count) 1196 | DCookie (_, n, _, _) => Int.max (n, count)
1195 | DStyle (_, n, _) => Int.max (n, count) 1197 | DStyle (_, n, _) => Int.max (n, count)
1196 | DInitializer _ => count) 0 1198 | DTask _ => count) 0
1197 1199
1198 end 1200 end
1199 1201
1200 end 1202 end