comparison src/elab_util.sml @ 100:f0f59e918cac

page declaration, up through monoize
author Adam Chlipala <adamc@hcoop.net>
date Thu, 10 Jul 2008 10:11:35 -0400
parents 7bab29834cd6
children 813e5a52063d
comparison
equal deleted inserted replaced
99:5182f0c80d2e 100:f0f59e918cac
508 bind (ctx, Sgn (x, sgn)) 508 bind (ctx, Sgn (x, sgn))
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 mfd ctx d)) ctx ds, 515 mfd ctx d)) ctx ds,
515 fn ds' => (StrConst ds', loc)) 516 fn ds' => (StrConst ds', loc))
516 | StrVar _ => S.return2 strAll 517 | StrVar _ => S.return2 strAll
517 | StrProj (str, x) => 518 | StrProj (str, x) =>
518 S.map2 (mfst ctx str, 519 S.map2 (mfst ctx str,
569 S.bind2 (mfc ctx c1, 570 S.bind2 (mfc ctx c1,
570 fn c1' => 571 fn c1' =>
571 S.map2 (mfc ctx c2, 572 S.map2 (mfc ctx c2,
572 fn c2' => 573 fn c2' =>
573 (DConstraint (c1', c2'), loc))) 574 (DConstraint (c1', c2'), loc)))
575 | DPage (c, e) =>
576 S.bind2 (mfc ctx c,
577 fn c' =>
578 S.map2 (mfe ctx e,
579 fn e' =>
580 (DPage (c', e'), loc)))
574 in 581 in
575 mfd 582 mfd
576 end 583 end
577 584
578 fun mapfold {kind, con, exp, sgn_item, sgn, str, decl} = 585 fun mapfold {kind, con, exp, sgn_item, sgn, str, decl} =