comparison src/mono_reduce.sml @ 726:6fc633d990e7

onError
author Adam Chlipala <adamc@hcoop.net>
date Thu, 16 Apr 2009 12:36:01 -0400
parents 755a71c99be5
children 7c6b6c3c7b79
comparison
equal deleted inserted replaced
725:4c5796512edc 726:6fc633d990e7
59 | EFfiApp ("Basis", "set_client_source", _) => true 59 | EFfiApp ("Basis", "set_client_source", _) => true
60 | EFfiApp ("Basis", "alert", _) => true 60 | EFfiApp ("Basis", "alert", _) => true
61 | EFfiApp ("Basis", "new_channel", _) => true 61 | EFfiApp ("Basis", "new_channel", _) => true
62 | EFfiApp ("Basis", "subscribe", _) => true 62 | EFfiApp ("Basis", "subscribe", _) => true
63 | EFfiApp ("Basis", "send", _) => true 63 | EFfiApp ("Basis", "send", _) => true
64 | EFfiApp ("Basis", "onError", _) => true
64 | EFfiApp _ => false 65 | EFfiApp _ => false
65 | EApp ((EFfi _, _), _) => false 66 | EApp ((EFfi _, _), _) => false
66 | EApp _ => true 67 | EApp _ => true
67 68
68 | EUnop (_, e) => impure e 69 | EUnop (_, e) => impure e
204 | Maybe => Maybe 205 | Maybe => Maybe
205 | Yes env => consider (rest, env) 206 | Yes env => consider (rest, env)
206 in 207 in
207 consider (xps, env) 208 consider (xps, env)
208 end 209 end
210
211 | (PNone _, ENone _) => Yes env
212 | (PSome (_, p), ESome (_, e)) => match (env, p, e)
209 213
210 | _ => Maybe 214 | _ => Maybe
211 215
212 datatype event = 216 datatype event =
213 WritePage 217 WritePage
280 | EFfiApp ("Basis", "set_client_source", es) => ffi es 284 | EFfiApp ("Basis", "set_client_source", es) => ffi es
281 | EFfiApp ("Basis", "alert", es) => ffi es 285 | EFfiApp ("Basis", "alert", es) => ffi es
282 | EFfiApp ("Basis", "new_channel", es) => ffi es 286 | EFfiApp ("Basis", "new_channel", es) => ffi es
283 | EFfiApp ("Basis", "subscribe", es) => ffi es 287 | EFfiApp ("Basis", "subscribe", es) => ffi es
284 | EFfiApp ("Basis", "send", es) => ffi es 288 | EFfiApp ("Basis", "send", es) => ffi es
289 | EFfiApp ("Basis", "onError", es) => ffi es
285 | EFfiApp (_, _, es) => List.concat (map (summarize d) es) 290 | EFfiApp (_, _, es) => List.concat (map (summarize d) es)
286 | EApp ((EFfi _, _), e) => summarize d e 291 | EApp ((EFfi _, _), e) => summarize d e
287 | EApp _ => 292 | EApp _ =>
288 let 293 let
289 fun unravel (e, passed, ls) = 294 fun unravel (e, passed, ls) =