diff src/monoize.sml @ 1421:3dab4696d116

Subqueries may always return NULL
author Adam Chlipala <adam@chlipala.net>
date Thu, 03 Feb 2011 21:04:12 -0500
parents a8606c1cfe87
children 541673c3161d
line wrap: on
line diff
--- a/src/monoize.sml	Thu Feb 03 11:12:48 2011 -0500
+++ b/src/monoize.sml	Thu Feb 03 21:04:12 2011 -0500
@@ -2796,7 +2796,9 @@
              (L.ECApp (
               (L.ECApp (
                (L.ECApp (
-                (L.EFfi ("Basis", "sql_subquery"), _),
+                (L.ECApp (
+                 (L.EFfi ("Basis", "sql_subquery"), _),
+                 _), _),
                 _), _),
                _), _),
               _), _),
@@ -2806,10 +2808,11 @@
                 val s = (L'.TFfi ("Basis", "string"), loc)
                 fun sc s = (L'.EPrim (Prim.String s), loc)
             in
-                ((L'.EAbs ("x", s, s,
-                           strcat [sc "(",
-                                   (L'.ERel 0, loc),
-                                   sc ")"]), loc),
+                ((L'.EAbs ("_", (L'.TRecord [], loc), (L'.TFun (s, s), loc),
+                           (L'.EAbs ("x", s, s,
+                                     strcat [sc "(",
+                                             (L'.ERel 0, loc),
+                                             sc ")"]), loc)), loc),
                  fm)
             end