comparison src/monoize.sml @ 392:a813476230e3

gt, ge
author Adam Chlipala <adamc@hcoop.net>
date Tue, 21 Oct 2008 11:04:24 -0400
parents fe8f75f7e130
children 9f6fe6f32961
comparison
equal deleted inserted replaced
391:fe8f75f7e130 392:a813476230e3
680 let 680 let
681 val t = monoType env t 681 val t = monoType env t
682 in 682 in
683 ((L'.EAbs ("r", ordTy t, (L'.TFun (t, (L'.TFun (t, (L'.TFfi ("Basis", "bool"), loc)), loc)), loc), 683 ((L'.EAbs ("r", ordTy t, (L'.TFun (t, (L'.TFun (t, (L'.TFfi ("Basis", "bool"), loc)), loc)), loc),
684 (L'.EField ((L'.ERel 0, loc), "Le"), loc)), loc), fm) 684 (L'.EField ((L'.ERel 0, loc), "Le"), loc)), loc), fm)
685 end
686 | L.ECApp ((L.EFfi ("Basis", "gt"), _), t) =>
687 let
688 val t = monoType env t
689 val b = (L'.TFfi ("Basis", "bool"), loc)
690 in
691 ((L'.EAbs ("f", ordTy t, (L'.TFun (t, (L'.TFun (t, b), loc)), loc),
692 (L'.EAbs ("x", t, (L'.TFun (t, b), loc),
693 (L'.EAbs ("y", t, b,
694 (L'.EUnop ("!",
695 (L'.EApp ((L'.EApp ((L'.EField ((L'.ERel 2, loc),
696 "Le"), loc),
697 (L'.ERel 1, loc)), loc),
698 (L'.ERel 0, loc)), loc)), loc)), loc)),
699 loc)),
700 loc), fm)
701 end
702 | L.ECApp ((L.EFfi ("Basis", "ge"), _), t) =>
703 let
704 val t = monoType env t
705 val b = (L'.TFfi ("Basis", "bool"), loc)
706 in
707 ((L'.EAbs ("f", ordTy t, (L'.TFun (t, (L'.TFun (t, b), loc)), loc),
708 (L'.EAbs ("x", t, (L'.TFun (t, b), loc),
709 (L'.EAbs ("y", t, b,
710 (L'.EUnop ("!",
711 (L'.EApp ((L'.EApp ((L'.EField ((L'.ERel 2, loc),
712 "Lt"), loc),
713 (L'.ERel 1, loc)), loc),
714 (L'.ERel 0, loc)), loc)), loc)), loc)),
715 loc)),
716 loc), fm)
685 end 717 end
686 | L.EFfi ("Basis", "ord_int") => 718 | L.EFfi ("Basis", "ord_int") =>
687 let 719 let
688 fun intBin s = 720 fun intBin s =
689 (L'.EAbs ("x", (L'.TFfi ("Basis", "int"), loc), 721 (L'.EAbs ("x", (L'.TFfi ("Basis", "int"), loc),