Mercurial > urweb
comparison src/monoize.sml @ 254:f8d9395575ec
Monoized binary operators
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 31 Aug 2008 14:33:22 -0400 |
parents | 7f6620853c36 |
children | 69d337f186eb |
comparison
equal
deleted
inserted
replaced
253:7f6620853c36 | 254:f8d9395575ec |
---|---|
682 | 682 |
683 | L.ECApp ( | 683 | L.ECApp ( |
684 (L.ECApp ( | 684 (L.ECApp ( |
685 (L.ECApp ( | 685 (L.ECApp ( |
686 (L.ECApp ( | 686 (L.ECApp ( |
687 (L.ECApp ( | |
688 (L.ECApp ( | |
689 (L.EFfi ("Basis", "sql_binary"), _), | |
690 _), _), | |
691 _), _), | |
692 _), _), | |
693 _), _), | |
694 _), _), | |
695 _) => | |
696 let | |
697 val s = (L'.TFfi ("Basis", "string"), loc) | |
698 fun sc s = (L'.EPrim (Prim.String s), loc) | |
699 in | |
700 ((L'.EAbs ("c", s, (L'.TFun (s, (L'.TFun (s, s), loc)), loc), | |
701 (L'.EAbs ("e1", s, (L'.TFun (s, s), loc), | |
702 (L'.EAbs ("e2", s, s, | |
703 strcat loc [sc "(", | |
704 (L'.ERel 1, loc), | |
705 sc " ", | |
706 (L'.ERel 2, loc), | |
707 sc " ", | |
708 (L'.ERel 0, loc), | |
709 sc ")"]), loc)), loc)), loc), | |
710 fm) | |
711 end | |
712 | L.EFfi ("Basis", "sql_and") => ((L'.EPrim (Prim.String "AND"), loc), fm) | |
713 | L.EFfi ("Basis", "sql_or") => ((L'.EPrim (Prim.String "OR"), loc), fm) | |
714 | |
715 | L.ECApp ( | |
716 (L.ECApp ( | |
717 (L.ECApp ( | |
718 (L.ECApp ( | |
687 (L.EFfi ("Basis", "sql_comparison"), _), | 719 (L.EFfi ("Basis", "sql_comparison"), _), |
688 _), _), | 720 _), _), |
689 _), _), | 721 _), _), |
690 _), _), | 722 _), _), |
691 _) => | 723 _) => |
694 fun sc s = (L'.EPrim (Prim.String s), loc) | 726 fun sc s = (L'.EPrim (Prim.String s), loc) |
695 in | 727 in |
696 ((L'.EAbs ("c", s, (L'.TFun (s, (L'.TFun (s, s), loc)), loc), | 728 ((L'.EAbs ("c", s, (L'.TFun (s, (L'.TFun (s, s), loc)), loc), |
697 (L'.EAbs ("e1", s, (L'.TFun (s, s), loc), | 729 (L'.EAbs ("e1", s, (L'.TFun (s, s), loc), |
698 (L'.EAbs ("e2", s, s, | 730 (L'.EAbs ("e2", s, s, |
699 strcat loc [(L'.ERel 1, loc), | 731 strcat loc [sc "(", |
732 (L'.ERel 1, loc), | |
700 sc " ", | 733 sc " ", |
701 (L'.ERel 2, loc), | 734 (L'.ERel 2, loc), |
702 sc " ", | 735 sc " ", |
703 (L'.ERel 0, loc)]), loc)), loc)), loc), | 736 (L'.ERel 0, loc), |
737 sc ")"]), loc)), loc)), loc), | |
704 fm) | 738 fm) |
705 end | 739 end |
706 | 740 |
707 | L.ECApp ( | 741 | L.ECApp ( |
708 (L.ECApp ( | 742 (L.ECApp ( |