diff src/monoize.sml @ 1072:9001966ae1c8

Weakening-type coercions for SQL values
author Adam Chlipala <adamc@hcoop.net>
date Sun, 13 Dec 2009 13:00:55 -0500
parents 26197c957ad6
children b2311dfb3158
line wrap: on
line diff
--- a/src/monoize.sml	Sun Dec 13 11:28:47 2009 -0500
+++ b/src/monoize.sml	Sun Dec 13 13:00:55 2009 -0500
@@ -1587,6 +1587,28 @@
                  fm)
             end
 
+          | L.ECApp (
+            (L.ECApp (
+             (L.ECApp (
+              (L.ECApp (
+               (L.ECApp (
+                (L.ECApp (
+                 (L.ECApp (
+                  (L.EFfi ("Basis", "sql_exp_weaken"), _),
+                  _), _),
+                 _), _),
+                _), _),
+               _), _),
+              _), _),
+             _), _),
+            _) =>
+            let
+                val string = (L'.TFfi ("Basis", "string"), loc)
+            in
+                ((L'.EAbs ("e", string, string, (L'.ERel 0, loc)), loc),
+                 fm)
+            end
+
           | L.ECApp ((L.EFfi ("Basis", "check"), _), _) =>
             let
                 val string = (L'.TFfi ("Basis", "string"), loc)
@@ -1993,6 +2015,16 @@
             ((L'.ERecord [], loc), fm)
           | L.ECApp ((L.EFfi ("Basis", "sql_subset_all"), _), _) =>
             ((L'.ERecord [], loc), fm)
+          | L.ECApp ((L.ECApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "sql_subset_concat"),
+                                                    _), _), _), _), _), _), _), _) =>
+            let
+                val un = (L'.TRecord [], loc) 
+            in
+                ((L'.EAbs ("_", un, (L'.TFun (un, un), loc),
+                           (L'.EAbs ("_", un, un,
+                                     (L'.ERecord [], loc)), loc)), loc),
+                 fm)
+            end
 
           | L.ECApp ((L.ECApp ((L.EFfi ("Basis", "fieldsOf_table"), _), _), _), _) =>
             ((L'.ERecord [], loc), fm)