diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-08-31 16:54:13 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-08-31 16:54:13 -0400 |
commit | 83431c3e4c3fa74cae515520be04a0be3c11fef2 (patch) | |
tree | b7d5f19b05bbef691eeeb0b4103fe952bcb42cb2 /src/monoize.sml | |
parent | 3b3eb1273341bcc8787ab2efa9f7fe7cfd2f9235 (diff) |
Monoize ASC/DESC
Diffstat (limited to 'src/monoize.sml')
-rw-r--r-- | src/monoize.sml | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/src/monoize.sml b/src/monoize.sml index 55245074..6624c971 100644 --- a/src/monoize.sml +++ b/src/monoize.sml @@ -718,17 +718,19 @@ fun monoExp (env, st, fm) (all as (e, loc)) = val s = (L'.TFfi ("Basis", "string"), loc) fun sc s = (L'.EPrim (Prim.String s), loc) in - ((L'.EAbs ("e1", s, (L'.TFun (s, s), loc), - (L'.EAbs ("e2", s, s, - (L'.ECase ((L'.ERel 0, loc), - [((L'.PPrim (Prim.String ""), loc), - (L'.ERel 1, loc)), - ((L'.PWild, loc), - strcat loc [(L'.ERel 1, loc), - sc ", ", - (L'.ERel 0, loc), - sc ")"])], - {disc = s, result = s}), loc)), loc)), loc), + ((L'.EAbs ("e1", s, (L'.TFun (s, (L'.TFun (s, s), loc)), loc), + (L'.EAbs ("d", s, (L'.TFun (s, s), loc), + (L'.EAbs ("e2", s, s, + (L'.ECase ((L'.ERel 0, loc), + [((L'.PPrim (Prim.String ""), loc), + strcat loc [(L'.ERel 2, loc), + (L'.ERel 1, loc)]), + ((L'.PWild, loc), + strcat loc [(L'.ERel 2, loc), + (L'.ERel 1, loc), + sc ", ", + (L'.ERel 0, loc)])], + {disc = s, result = s}), loc)), loc)), loc)), loc), fm) end @@ -968,6 +970,9 @@ fun monoExp (env, st, fm) (all as (e, loc)) = (L'.EPrim (Prim.String "MIN"), loc)), loc), fm) + | L.EFfi ("Basis", "sql_asc") => ((L'.EPrim (Prim.String ""), loc), fm) + | L.EFfi ("Basis", "sql_desc") => ((L'.EPrim (Prim.String " DESC"), loc), fm) + | L.EApp ( (L.ECApp ( (L.ECApp ((L.EFfi ("Basis", "cdata"), _), _), _), |