Mercurial > urweb
comparison src/monoize.sml @ 268:bacd0ba869e1
Monoize ASC/DESC
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 31 Aug 2008 16:54:13 -0400 |
parents | f31e8da68e90 |
children | 42dfb0d61cf0 |
comparison
equal
deleted
inserted
replaced
267:f31e8da68e90 | 268:bacd0ba869e1 |
---|---|
716 _) => | 716 _) => |
717 let | 717 let |
718 val s = (L'.TFfi ("Basis", "string"), loc) | 718 val s = (L'.TFfi ("Basis", "string"), loc) |
719 fun sc s = (L'.EPrim (Prim.String s), loc) | 719 fun sc s = (L'.EPrim (Prim.String s), loc) |
720 in | 720 in |
721 ((L'.EAbs ("e1", s, (L'.TFun (s, s), loc), | 721 ((L'.EAbs ("e1", s, (L'.TFun (s, (L'.TFun (s, s), loc)), loc), |
722 (L'.EAbs ("e2", s, s, | 722 (L'.EAbs ("d", s, (L'.TFun (s, s), loc), |
723 (L'.ECase ((L'.ERel 0, loc), | 723 (L'.EAbs ("e2", s, s, |
724 [((L'.PPrim (Prim.String ""), loc), | 724 (L'.ECase ((L'.ERel 0, loc), |
725 (L'.ERel 1, loc)), | 725 [((L'.PPrim (Prim.String ""), loc), |
726 ((L'.PWild, loc), | 726 strcat loc [(L'.ERel 2, loc), |
727 strcat loc [(L'.ERel 1, loc), | 727 (L'.ERel 1, loc)]), |
728 sc ", ", | 728 ((L'.PWild, loc), |
729 (L'.ERel 0, loc), | 729 strcat loc [(L'.ERel 2, loc), |
730 sc ")"])], | 730 (L'.ERel 1, loc), |
731 {disc = s, result = s}), loc)), loc)), loc), | 731 sc ", ", |
732 (L'.ERel 0, loc)])], | |
733 {disc = s, result = s}), loc)), loc)), loc)), loc), | |
732 fm) | 734 fm) |
733 end | 735 end |
734 | 736 |
735 | L.EFfi ("Basis", "sql_no_limit") => | 737 | L.EFfi ("Basis", "sql_no_limit") => |
736 ((L'.EPrim (Prim.String ""), loc), fm) | 738 ((L'.EPrim (Prim.String ""), loc), fm) |
965 fm) | 967 fm) |
966 | L.ECApp ((L.EFfi ("Basis", "sql_min"), _), _) => | 968 | L.ECApp ((L.EFfi ("Basis", "sql_min"), _), _) => |
967 ((L'.EAbs ("_", (L'.TRecord [], loc), (L'.TFfi ("Basis", "string"), loc), | 969 ((L'.EAbs ("_", (L'.TRecord [], loc), (L'.TFfi ("Basis", "string"), loc), |
968 (L'.EPrim (Prim.String "MIN"), loc)), loc), | 970 (L'.EPrim (Prim.String "MIN"), loc)), loc), |
969 fm) | 971 fm) |
972 | |
973 | L.EFfi ("Basis", "sql_asc") => ((L'.EPrim (Prim.String ""), loc), fm) | |
974 | L.EFfi ("Basis", "sql_desc") => ((L'.EPrim (Prim.String " DESC"), loc), fm) | |
970 | 975 |
971 | L.EApp ( | 976 | L.EApp ( |
972 (L.ECApp ( | 977 (L.ECApp ( |
973 (L.ECApp ((L.EFfi ("Basis", "cdata"), _), _), _), | 978 (L.ECApp ((L.EFfi ("Basis", "cdata"), _), _), _), |
974 _), _), | 979 _), _), |