comparison src/checknest.sml @ 1663:0577be31a435

First part of changes to avoid depending on C function call argument order of evaluation (omitting normal Ur function calls, so far)
author Adam Chlipala <adam@chlipala.net>
date Sat, 07 Jan 2012 15:56:22 -0500
parents acabf3935060
children 98895243b5b6
comparison
equal deleted inserted replaced
1662:edf86cef0dba 1663:0577be31a435
42 | ECon (_, _, NONE) => IS.empty 42 | ECon (_, _, NONE) => IS.empty
43 | ECon (_, _, SOME e) => eu e 43 | ECon (_, _, SOME e) => eu e
44 | ENone _ => IS.empty 44 | ENone _ => IS.empty
45 | ESome (_, e) => eu e 45 | ESome (_, e) => eu e
46 | EFfi _ => IS.empty 46 | EFfi _ => IS.empty
47 | EFfiApp (_, _, es) => foldl IS.union IS.empty (map eu es) 47 | EFfiApp (_, _, es) => foldl IS.union IS.empty (map (eu o #1) es)
48 | EApp (e, es) => foldl IS.union (eu e) (map eu es) 48 | EApp (e, es) => foldl IS.union (eu e) (map eu es)
49 49
50 | EUnop (_, e) => eu e 50 | EUnop (_, e) => eu e
51 | EBinop (_, e1, e2) => IS.union (eu e1, eu e2) 51 | EBinop (_, e1, e2) => IS.union (eu e1, eu e2)
52 52
104 | ECon (_, _, NONE) => e 104 | ECon (_, _, NONE) => e
105 | ECon (dk, pc, SOME e) => (ECon (dk, pc, SOME (ae e)), loc) 105 | ECon (dk, pc, SOME e) => (ECon (dk, pc, SOME (ae e)), loc)
106 | ENone _ => e 106 | ENone _ => e
107 | ESome (t, e) => (ESome (t, ae e), loc) 107 | ESome (t, e) => (ESome (t, ae e), loc)
108 | EFfi _ => e 108 | EFfi _ => e
109 | EFfiApp (m, f, es) => (EFfiApp (m, f, map ae es), loc) 109 | EFfiApp (m, f, es) => (EFfiApp (m, f, map (fn (e, t) => (ae e, t)) es), loc)
110 | EApp (e, es) => (EApp (ae e, map ae es), loc) 110 | EApp (e, es) => (EApp (ae e, map ae es), loc)
111 111
112 | EUnop (uo, e) => (EUnop (uo, ae e), loc) 112 | EUnop (uo, e) => (EUnop (uo, ae e), loc)
113 | EBinop (bo, e1, e2) => (EBinop (bo, ae e1, ae e2), loc) 113 | EBinop (bo, e1, e2) => (EBinop (bo, ae e1, ae e2), loc)
114 114