comparison src/elab_util.sml @ 109:813e5a52063d

Remove closure conversion in favor of zany fun with modules, which also replaces 'page'
author Adam Chlipala <adamc@hcoop.net>
date Sun, 13 Jul 2008 10:17:06 -0400
parents f0f59e918cac
children e3041657d653
comparison
equal deleted inserted replaced
108:f59553dc1b6a 109:813e5a52063d
509 | DStr (x, _, sgn, _) => 509 | DStr (x, _, sgn, _) =>
510 bind (ctx, Str (x, sgn)) 510 bind (ctx, Str (x, sgn))
511 | DFfiStr (x, _, sgn) => 511 | DFfiStr (x, _, sgn) =>
512 bind (ctx, Str (x, sgn)) 512 bind (ctx, Str (x, sgn))
513 | DConstraint _ => ctx 513 | DConstraint _ => ctx
514 | DPage _ => ctx, 514 | DExport _ => ctx,
515 mfd ctx d)) ctx ds, 515 mfd ctx d)) ctx ds,
516 fn ds' => (StrConst ds', loc)) 516 fn ds' => (StrConst ds', loc))
517 | StrVar _ => S.return2 strAll 517 | StrVar _ => S.return2 strAll
518 | StrProj (str, x) => 518 | StrProj (str, x) =>
519 S.map2 (mfst ctx str, 519 S.map2 (mfst ctx str,
570 S.bind2 (mfc ctx c1, 570 S.bind2 (mfc ctx c1,
571 fn c1' => 571 fn c1' =>
572 S.map2 (mfc ctx c2, 572 S.map2 (mfc ctx c2,
573 fn c2' => 573 fn c2' =>
574 (DConstraint (c1', c2'), loc))) 574 (DConstraint (c1', c2'), loc)))
575 | DPage (c, e) => 575 | DExport (en, sgn, str) =>
576 S.bind2 (mfc ctx c, 576 S.bind2 (mfsg ctx sgn,
577 fn c' => 577 fn sgn' =>
578 S.map2 (mfe ctx e, 578 S.map2 (mfst ctx str,
579 fn e' => 579 fn str' =>
580 (DPage (c', e'), loc))) 580 (DExport (en, sgn', str'), loc)))
581 in 581 in
582 mfd 582 mfd
583 end 583 end
584 584
585 fun mapfold {kind, con, exp, sgn_item, sgn, str, decl} = 585 fun mapfold {kind, con, exp, sgn_item, sgn, str, decl} =