Mercurial > urweb
comparison src/expl_util.sml @ 449:89f766f19d5b
Explify 'let'
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 01 Nov 2008 16:08:39 -0400 |
parents | dfc8c991abd0 |
children | 787d4931fb07 |
comparison
equal
deleted
inserted
replaced
448:85819353a84f | 449:89f766f19d5b |
---|---|
323 S.bind2 (mfc ctx disc, | 323 S.bind2 (mfc ctx disc, |
324 fn disc' => | 324 fn disc' => |
325 S.map2 (mfc ctx result, | 325 S.map2 (mfc ctx result, |
326 fn result' => | 326 fn result' => |
327 (ECase (e', pes', {disc = disc', result = result'}), loc))))) | 327 (ECase (e', pes', {disc = disc', result = result'}), loc))))) |
328 | |
329 | ELet (x, t, e1, e2) => | |
330 S.bind2 (mfc ctx t, | |
331 fn t' => | |
332 S.bind2 (mfe ctx e1, | |
333 fn e1' => | |
334 S.map2 (mfe ctx e2, | |
335 fn e2' => | |
336 (ELet (x, t', e1', e2'), loc)))) | |
328 in | 337 in |
329 mfe | 338 mfe |
330 end | 339 end |
331 | 340 |
332 fun mapfold {kind = fk, con = fc, exp = fe} = | 341 fun mapfold {kind = fk, con = fc, exp = fe} = |