comparison src/monoize.sml @ 390:519366a76603

num_float
author Adam Chlipala <adamc@hcoop.net>
date Tue, 21 Oct 2008 10:40:22 -0400
parents acaf9d19fbb7
children fe8f75f7e130
comparison
equal deleted inserted replaced
389:acaf9d19fbb7 390:519366a76603
630 intBin "+", 630 intBin "+",
631 intBin "-", 631 intBin "-",
632 intBin "*", 632 intBin "*",
633 intBin "/", 633 intBin "/",
634 intBin "%") 634 intBin "%")
635 end
636 | L.EFfi ("Basis", "num_float") =>
637 let
638 fun floatBin s =
639 (L'.EAbs ("x", (L'.TFfi ("Basis", "float"), loc),
640 (L'.TFun ((L'.TFfi ("Basis", "float"), loc), (L'.TFfi ("Basis", "float"), loc)), loc),
641 (L'.EAbs ("y", (L'.TFfi ("Basis", "float"), loc),
642 (L'.TFfi ("Basis", "float"), loc),
643 (L'.EBinop (s, (L'.ERel 1, loc), (L'.ERel 0, loc)), loc)), loc)), loc)
644 in
645 numEx ((L'.TFfi ("Basis", "float"), loc),
646 (L'.EAbs ("x", (L'.TFfi ("Basis", "float"), loc),
647 (L'.TFfi ("Basis", "float"), loc),
648 (L'.EUnop ("-", (L'.ERel 0, loc)), loc)), loc),
649 floatBin "+",
650 floatBin "-",
651 floatBin "*",
652 floatBin "/",
653 floatBin "fmod")
635 end 654 end
636 655
637 | L.ECApp ((L.EFfi ("Basis", "show"), _), t) => 656 | L.ECApp ((L.EFfi ("Basis", "show"), _), t) =>
638 let 657 let
639 val t = monoType env t 658 val t = monoType env t