comparison src/elab_util.sml @ 493:ae03d09043c1

Add CutMulti
author Adam Chlipala <adamc@hcoop.net>
date Tue, 11 Nov 2008 19:20:37 -0500
parents d34834af4512
children 44958d74c43f
comparison
equal deleted inserted replaced
492:4a241d108a2c 493:ae03d09043c1
335 S.bind2 (mfc ctx field, 335 S.bind2 (mfc ctx field,
336 fn field' => 336 fn field' =>
337 S.map2 (mfc ctx rest, 337 S.map2 (mfc ctx rest,
338 fn rest' => 338 fn rest' =>
339 (ECut (e', c', {field = field', rest = rest'}), loc))))) 339 (ECut (e', c', {field = field', rest = rest'}), loc)))))
340
341 | ECutMulti (e, c, {rest}) =>
342 S.bind2 (mfe ctx e,
343 fn e' =>
344 S.bind2 (mfc ctx c,
345 fn c' =>
346 S.map2 (mfc ctx rest,
347 fn rest' =>
348 (ECutMulti (e', c', {rest = rest'}), loc))))
340 349
341 | EFold k => 350 | EFold k =>
342 S.map2 (mfk k, 351 S.map2 (mfk k,
343 fn k' => 352 fn k' =>
344 (EFold k', loc)) 353 (EFold k', loc))