Mercurial > urweb
comparison src/mono_reduce.sml @ 1171:7a2a7a8f9cab
benignEffectful
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 27 Feb 2010 16:49:11 -0500 |
parents | 7a31e0cf25e9 |
children | ae3036773768 |
comparison
equal
deleted
inserted
replaced
1170:52c6ac6a59f1 | 1171:7a2a7a8f9cab |
---|---|
50 EWrite _ => true | 50 EWrite _ => true |
51 | EQuery _ => true | 51 | EQuery _ => true |
52 | EDml _ => true | 52 | EDml _ => true |
53 | ENextval _ => true | 53 | ENextval _ => true |
54 | ESetval _ => true | 54 | ESetval _ => true |
55 | EFfiApp (m, x, _) => Settings.isEffectful (m, x) | 55 | EFfiApp (m, x, _) => Settings.isEffectful (m, x) orelse Settings.isBenignEffectful (m, x) |
56 | EServerCall _ => true | 56 | EServerCall _ => true |
57 | ERecv _ => true | 57 | ERecv _ => true |
58 | ESleep _ => true | 58 | ESleep _ => true |
59 | ENamed n => IS.member (syms, n) | 59 | ENamed n => IS.member (syms, n) |
60 | EError _ => true | 60 | EError _ => true |
85 | ENamed _ => false | 85 | ENamed _ => false |
86 | ECon (_, _, eo) => (case eo of NONE => false | SOME e => impure e) | 86 | ECon (_, _, eo) => (case eo of NONE => false | SOME e => impure e) |
87 | ENone _ => false | 87 | ENone _ => false |
88 | ESome (_, e) => impure e | 88 | ESome (_, e) => impure e |
89 | EFfi _ => false | 89 | EFfi _ => false |
90 | EFfiApp (m, x, _) => Settings.isEffectful (m, x) | 90 | EFfiApp (m, x, _) => Settings.isEffectful (m, x) orelse Settings.isBenignEffectful (m, x) |
91 | EApp ((EFfi _, _), _) => false | 91 | EApp ((EFfi _, _), _) => false |
92 | EApp _ => true | 92 | EApp _ => true |
93 | 93 |
94 | EUnop (_, e) => impure e | 94 | EUnop (_, e) => impure e |
95 | EBinop (_, e1, e2) => impure e1 orelse impure e2 | 95 | EBinop (_, e1, e2) => impure e1 orelse impure e2 |
370 | ECon (_, _, SOME e) => summarize d e | 370 | ECon (_, _, SOME e) => summarize d e |
371 | ENone _ => [] | 371 | ENone _ => [] |
372 | ESome (_, e) => summarize d e | 372 | ESome (_, e) => summarize d e |
373 | EFfi _ => [] | 373 | EFfi _ => [] |
374 | EFfiApp (m, x, es) => | 374 | EFfiApp (m, x, es) => |
375 if Settings.isEffectful (m, x) then | 375 if Settings.isEffectful (m, x) orelse Settings.isBenignEffectful (m, x) then |
376 List.concat (map (summarize d) es) @ [Unsure] | 376 List.concat (map (summarize d) es) @ [Unsure] |
377 else | 377 else |
378 List.concat (map (summarize d) es) | 378 List.concat (map (summarize d) es) |
379 | EApp ((EFfi _, _), e) => summarize d e | 379 | EApp ((EFfi _, _), e) => summarize d e |
380 | EApp _ => | 380 | EApp _ => |