comparison src/mono_reduce.sml @ 185:19ee24bffbc0

FFI datatypes
author Adam Chlipala <adamc@hcoop.net>
date Sun, 03 Aug 2008 17:57:47 -0400
parents 98c29e3986d3
children 8e9f97508f0d
comparison
equal deleted inserted replaced
184:98c29e3986d3 185:19ee24bffbc0
77 if Prim.equal (p, p') then 77 if Prim.equal (p, p') then
78 SOME env 78 SOME env
79 else 79 else
80 NONE 80 NONE
81 81
82 | (PCon (PConVar n1, NONE), ECon (n2, NONE)) => 82 | (PCon (PConVar n1, NONE), ECon (PConVar n2, NONE)) =>
83 if n1 = n2 then 83 if n1 = n2 then
84 SOME env 84 SOME env
85 else 85 else
86 NONE 86 NONE
87 87
88 | (PCon (PConVar n1, SOME p), ECon (n2, SOME e)) => 88 | (PCon (PConVar n1, SOME p), ECon (PConVar n2, SOME e)) =>
89 if n1 = n2 then 89 if n1 = n2 then
90 match (env, p, e)
91 else
92 NONE
93
94 | (PCon (PConFfi {mod = m1, con = con1, ...}, NONE), ECon (PConFfi {mod = m2, con = con2, ...}, NONE)) =>
95 if m1 = m2 andalso con1 = con2 then
96 SOME env
97 else
98 NONE
99
100 | (PCon (PConFfi {mod = m1, con = con1, ...}, SOME ep), ECon (PConFfi {mod = m2, con = con2, ...}, SOME e)) =>
101 if m1 = m2 andalso con1 = con2 then
90 match (env, p, e) 102 match (env, p, e)
91 else 103 else
92 NONE 104 NONE
93 105
94 | (PRecord xps, ERecord xes) => 106 | (PRecord xps, ERecord xes) =>