comparison src/elab_util.sml @ 207:cc68da3801bc

Non-star SELECT
author Adam Chlipala <adamc@hcoop.net>
date Thu, 14 Aug 2008 18:35:08 -0400
parents cb8f69556975
children e86411f647c6
comparison
equal deleted inserted replaced
206:cb8493759a7b 207:cc68da3801bc
66 fn k' => 66 fn k' =>
67 (KRecord k', loc)) 67 (KRecord k', loc))
68 68
69 | KUnit => S.return2 kAll 69 | KUnit => S.return2 kAll
70 70
71 | KTuple ks =>
72 S.map2 (ListUtil.mapfold mfk ks,
73 fn ks' =>
74 (KTuple ks', loc))
75
71 | KError => S.return2 kAll 76 | KError => S.return2 kAll
72 77
73 | KUnif (_, _, ref (SOME k)) => mfk' k 78 | KUnif (_, _, ref (SOME k)) => mfk' k
74 | KUnif _ => S.return2 kAll 79 | KUnif _ => S.return2 kAll
75 in 80 in
177 S.map2 (mfk k2, 182 S.map2 (mfk k2,
178 fn k2' => 183 fn k2' =>
179 (CFold (k1', k2'), loc))) 184 (CFold (k1', k2'), loc)))
180 185
181 | CUnit => S.return2 cAll 186 | CUnit => S.return2 cAll
187
188 | CTuple cs =>
189 S.map2 (ListUtil.mapfold (mfc ctx) cs,
190 fn cs' =>
191 (CTuple cs', loc))
192
193 | CProj (c, n) =>
194 S.map2 (mfc ctx c,
195 fn c' =>
196 (CProj (c', n), loc))
182 197
183 | CError => S.return2 cAll 198 | CError => S.return2 cAll
184 | CUnif (_, _, _, ref (SOME c)) => mfc' ctx c 199 | CUnif (_, _, _, ref (SOME c)) => mfc' ctx c
185 | CUnif _ => S.return2 cAll 200 | CUnif _ => S.return2 cAll
186 in 201 in