comparison src/expl_util.sml @ 176:33d4a8eea484

Case through explify
author Adam Chlipala <adamc@hcoop.net>
date Thu, 31 Jul 2008 16:28:55 -0400
parents 06a98129b23f
children d11754ffe252
comparison
equal deleted inserted replaced
175:b2d752455182 176:33d4a8eea484
284 284
285 | EWrite e => 285 | EWrite e =>
286 S.map2 (mfe ctx e, 286 S.map2 (mfe ctx e,
287 fn e' => 287 fn e' =>
288 (EWrite e', loc)) 288 (EWrite e', loc))
289
290 | ECase (e, pes, t) =>
291 S.bind2 (mfe ctx e,
292 fn e' =>
293 S.bind2 (ListUtil.mapfold (fn (p, e) =>
294 S.map2 (mfe ctx e,
295 fn e' => (p, e'))) pes,
296 fn pes' =>
297 S.map2 (mfc ctx t,
298 fn t' =>
299 (ECase (e', pes', t'), loc))))
289 in 300 in
290 mfe 301 mfe
291 end 302 end
292 303
293 fun mapfold {kind = fk, con = fc, exp = fe} = 304 fun mapfold {kind = fk, con = fc, exp = fe} =