comparison src/monoize.sml @ 264:35ed669a253f

Monoize unops
author Adam Chlipala <adamc@hcoop.net>
date Sun, 31 Aug 2008 16:13:07 -0400
parents 02e1870a0516
children b66e692422a4
comparison
equal deleted inserted replaced
263:02e1870a0516 264:35ed669a253f
779 | L.ECApp ( 779 | L.ECApp (
780 (L.ECApp ( 780 (L.ECApp (
781 (L.ECApp ( 781 (L.ECApp (
782 (L.ECApp ( 782 (L.ECApp (
783 (L.ECApp ( 783 (L.ECApp (
784 (L.EFfi ("Basis", "sql_unary"), _),
785 _), _),
786 _), _),
787 _), _),
788 _), _),
789 _) =>
790 let
791 val s = (L'.TFfi ("Basis", "string"), loc)
792 fun sc s = (L'.EPrim (Prim.String s), loc)
793 in
794 ((L'.EAbs ("c", s, (L'.TFun (s, (L'.TFun (s, s), loc)), loc),
795 (L'.EAbs ("e1", s, (L'.TFun (s, s), loc),
796 strcat loc [sc "(",
797 (L'.ERel 1, loc),
798 sc " ",
799 (L'.ERel 0, loc),
800 sc ")"]), loc)), loc),
801 fm)
802 end
803 | L.EFfi ("Basis", "sql_not") => ((L'.EPrim (Prim.String "NOT"), loc), fm)
804
805 | L.ECApp (
806 (L.ECApp (
807 (L.ECApp (
808 (L.ECApp (
809 (L.ECApp (
784 (L.ECApp ( 810 (L.ECApp (
785 (L.EFfi ("Basis", "sql_binary"), _), 811 (L.EFfi ("Basis", "sql_binary"), _),
786 _), _), 812 _), _),
787 _), _), 813 _), _),
788 _), _), 814 _), _),