comparison src/core_util.sml @ 1199:c316ca3c9ec6

Pushing policies through
author Adam Chlipala <adamc@hcoop.net>
date Sun, 04 Apr 2010 12:29:34 -0400
parents 338be96f8533
children b4480a56cab7
comparison
equal deleted inserted replaced
1197:6d8e3dcb9713 1199:c316ca3c9ec6
990 S.bind2 (mfe ctx e1, 990 S.bind2 (mfe ctx e1,
991 fn e1' => 991 fn e1' =>
992 S.map2 (mfe ctx e2, 992 S.map2 (mfe ctx e2,
993 fn e2' => 993 fn e2' =>
994 (DTask (e1', e2'), loc))) 994 (DTask (e1', e2'), loc)))
995 | DPolicy e =>
996 S.map2 (mfe ctx e,
997 fn e' =>
998 (DPolicy e', loc))
995 999
996 and mfvi ctx (x, n, t, e, s) = 1000 and mfvi ctx (x, n, t, e, s) =
997 S.bind2 (mfc ctx t, 1001 S.bind2 (mfc ctx t,
998 fn t' => 1002 fn t' =>
999 S.map2 (mfe ctx e, 1003 S.map2 (mfe ctx e,
1145 val t = (CFfi ("Basis", "css_class"), #2 d') 1149 val t = (CFfi ("Basis", "css_class"), #2 d')
1146 in 1150 in
1147 bind (ctx, NamedE (x, n, t, NONE, s)) 1151 bind (ctx, NamedE (x, n, t, NONE, s))
1148 end 1152 end
1149 | DTask _ => ctx 1153 | DTask _ => ctx
1154 | DPolicy _ => ctx
1150 in 1155 in
1151 S.map2 (mff ctx' ds', 1156 S.map2 (mff ctx' ds',
1152 fn ds' => 1157 fn ds' =>
1153 d' :: ds') 1158 d' :: ds')
1154 end) 1159 end)
1208 | DSequence (_, n, _) => Int.max (n, count) 1213 | DSequence (_, n, _) => Int.max (n, count)
1209 | DView (_, n, _, _, _) => Int.max (n, count) 1214 | DView (_, n, _, _, _) => Int.max (n, count)
1210 | DDatabase _ => count 1215 | DDatabase _ => count
1211 | DCookie (_, n, _, _) => Int.max (n, count) 1216 | DCookie (_, n, _, _) => Int.max (n, count)
1212 | DStyle (_, n, _) => Int.max (n, count) 1217 | DStyle (_, n, _) => Int.max (n, count)
1213 | DTask _ => count) 0 1218 | DTask _ => count
1219 | DPolicy _ => count) 0
1214 1220
1215 end 1221 end
1216 1222
1217 end 1223 end