diff src/monoize.sml @ 1775:6bc2a8cb3a67

Track whether SQL expressions may use window functions, in preparation for actual window function support
author Adam Chlipala <adam@chlipala.net>
date Sat, 02 Jun 2012 15:35:58 -0400
parents a1380fc15cb5
children 8f28c3295148
line wrap: on
line diff
--- a/src/monoize.sml	Sat Jun 02 10:54:49 2012 -0400
+++ b/src/monoize.sml	Sat Jun 02 15:35:58 2012 -0400
@@ -249,7 +249,7 @@
                     (L'.TFfi ("Basis", "string"), loc)
                   | L.CApp ((L.CApp ((L.CFfi ("Basis", "sql_from_items"), _), _), _), _) =>
                     (L'.TFfi ("Basis", "string"), loc)
-                  | L.CApp ((L.CApp ((L.CApp ((L.CApp ((L.CFfi ("Basis", "sql_exp"), _), _), _), _), _), _), _), _) =>
+                  | L.CApp ((L.CApp ((L.CApp ((L.CApp ((L.CApp ((L.CFfi ("Basis", "sql_exp"), _), _), _), _), _), _), _), _), _), _) =>
                     (L'.TFfi ("Basis", "string"), loc)
                   | L.CApp ((L.CApp ((L.CFfi ("Basis", "primary_key"), _), _), _), _) =>
                     (L'.TFfi ("Basis", "string"), loc)
@@ -2107,7 +2107,9 @@
             (L.ECApp (
              (L.ECApp (
               (L.ECApp (
-               (L.EFfi ("Basis", "sql_inject"), _),
+               (L.ECApp (
+                (L.EFfi ("Basis", "sql_inject"), _),
+                _), _),
                _), _),
               _), _),
              _), _),
@@ -2506,8 +2508,10 @@
              (L.ECApp (
               (L.ECApp (
                (L.ECApp (
+                (L.ECApp (
                  (L.EFfi ("Basis", "sql_unary"), _),
                  _), _),
+                _), _),
                _), _),
               _), _),
              _), _),
@@ -2536,7 +2540,9 @@
               (L.ECApp (
                (L.ECApp (
                 (L.ECApp (
-                 (L.EFfi ("Basis", "sql_binary"), _),
+                 (L.ECApp (
+                  (L.EFfi ("Basis", "sql_binary"), _),
+                  _), _),
                  _), _),
                 _), _),
                _), _),
@@ -2569,7 +2575,9 @@
                (L.ECApp (
                 (L.ECApp (
                  (L.ECApp (
-                  (L.EFfi ("Basis", "sql_field"), _),
+                  (L.ECApp (
+                   (L.EFfi ("Basis", "sql_field"), _),
+                   _), _),
                   _), _),
                  _), _),
                 _), _),
@@ -2583,7 +2591,9 @@
              (L.ECApp (
               (L.ECApp (
                (L.ECApp (
-                (L.EFfi ("Basis", "sql_exp"), _),
+                (L.ECApp (
+                 (L.EFfi ("Basis", "sql_exp"), _),
+                 _), _),
                 _), _),
                _), _),
               _), _),
@@ -2687,7 +2697,9 @@
           | L.ECApp (
             (L.ECApp (
              (L.ECApp (
-              (L.EFfi ("Basis", "sql_count"), _),
+              (L.ECApp (
+               (L.EFfi ("Basis", "sql_count"), _),
+               _), _),
               _), _),
              _), _),
             _) => ((L'.EPrim (Prim.String "COUNT(*)"), loc),
@@ -2698,7 +2710,9 @@
              (L.ECApp (
               (L.ECApp (
                (L.ECApp (
-                (L.EFfi ("Basis", "sql_aggregate"), _),
+                (L.ECApp (
+                 (L.EFfi ("Basis", "sql_aggregate"), _),
+                 _), _),
                 _), _),
                _), _),
               _), _),
@@ -2770,11 +2784,13 @@
             (L.ECApp (
              (L.ECApp (
               (L.ECApp (
-               (L.EFfi ("Basis", "sql_nfunc"), _),
+               (L.ECApp (
+                (L.EFfi ("Basis", "sql_nfunc"), _),
+                _), _),
                _), _),
               _), _),
              _), _),
-           _) =>
+            _) =>
             let
                 val s = (L'.TFfi ("Basis", "string"), loc)
                 fun sc s = (L'.EPrim (Prim.String s), loc)
@@ -2789,7 +2805,9 @@
              (L.ECApp (
               (L.ECApp (
                (L.ECApp (
-                (L.EFfi ("Basis", "sql_ufunc"), _),
+                (L.ECApp (
+                 (L.EFfi ("Basis", "sql_ufunc"), _),
+                 _), _),
                 _), _),
                _), _),
               _), _),
@@ -2823,7 +2841,9 @@
              (L.ECApp (
               (L.ECApp (
                (L.ECApp (
-                (L.EFfi ("Basis", "sql_is_null"), _), _),
+                (L.ECApp (
+                 (L.EFfi ("Basis", "sql_is_null"), _), _),
+                 _), _),
                 _), _),
                _), _),
               _), _)) =>
@@ -2864,7 +2884,11 @@
              (L.ECApp (
               (L.ECApp (
                (L.ECApp (
-                (L.EFfi ("Basis", "sql_if_then_else"), _), _),
+                (L.ECApp (
+                 (L.ECApp (
+                  (L.EFfi ("Basis", "sql_if_then_else"), _), _),
+                  _), _),
+                 _), _),
                 _), _),
                _), _),
               _), _)) =>
@@ -2889,7 +2913,9 @@
             (L.ECApp (
              (L.ECApp (
               (L.ECApp (
-               (L.EFfi ("Basis", "sql_nullable"), _),
+               (L.ECApp (
+                (L.EFfi ("Basis", "sql_nullable"), _),
+                _), _),
                _), _),
               _), _),
              _), _),
@@ -2910,7 +2936,9 @@
               (L.ECApp (
                (L.ECApp (
                 (L.ECApp (
-                 (L.EFfi ("Basis", "sql_subquery"), _),
+                 (L.ECApp (
+                  (L.EFfi ("Basis", "sql_subquery"), _),
+                  _), _),
                  _), _),
                 _), _),
                _), _),