comparison src/core_util.sml @ 1294:b4480a56cab7

Server-side 'onError'
author Adam Chlipala <adam@chlipala.net>
date Tue, 07 Sep 2010 08:28:07 -0400
parents c316ca3c9ec6
children 0577be31a435
comparison
equal deleted inserted replaced
1293:acabf3935060 1294:b4480a56cab7
995 | DPolicy e => 995 | DPolicy e =>
996 S.map2 (mfe ctx e, 996 S.map2 (mfe ctx e,
997 fn e' => 997 fn e' =>
998 (DPolicy e', loc)) 998 (DPolicy e', loc))
999 999
1000 | DOnError _ => S.return2 dAll
1001
1000 and mfvi ctx (x, n, t, e, s) = 1002 and mfvi ctx (x, n, t, e, s) =
1001 S.bind2 (mfc ctx t, 1003 S.bind2 (mfc ctx t,
1002 fn t' => 1004 fn t' =>
1003 S.map2 (mfe ctx e, 1005 S.map2 (mfe ctx e,
1004 fn e' => 1006 fn e' =>
1150 in 1152 in
1151 bind (ctx, NamedE (x, n, t, NONE, s)) 1153 bind (ctx, NamedE (x, n, t, NONE, s))
1152 end 1154 end
1153 | DTask _ => ctx 1155 | DTask _ => ctx
1154 | DPolicy _ => ctx 1156 | DPolicy _ => ctx
1157 | DOnError _ => ctx
1155 in 1158 in
1156 S.map2 (mff ctx' ds', 1159 S.map2 (mff ctx' ds',
1157 fn ds' => 1160 fn ds' =>
1158 d' :: ds') 1161 d' :: ds')
1159 end) 1162 end)
1214 | DView (_, n, _, _, _) => Int.max (n, count) 1217 | DView (_, n, _, _, _) => Int.max (n, count)
1215 | DDatabase _ => count 1218 | DDatabase _ => count
1216 | DCookie (_, n, _, _) => Int.max (n, count) 1219 | DCookie (_, n, _, _) => Int.max (n, count)
1217 | DStyle (_, n, _) => Int.max (n, count) 1220 | DStyle (_, n, _) => Int.max (n, count)
1218 | DTask _ => count 1221 | DTask _ => count
1219 | DPolicy _ => count) 0 1222 | DPolicy _ => count
1223 | DOnError _ => count) 0
1220 1224
1221 end 1225 end
1222 1226
1223 end 1227 end