summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-12-13 13:00:55 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-12-13 13:00:55 -0500
commit1063981355a5a041793c095c6fd89b91fa0bd579 (patch)
tree5efa45fb63fd11922b53c5575df691072fcbbeca /src
parent46d562fc3d06a5ef8b17e90c7a4dfd0547757294 (diff)
Weakening-type coercions for SQL values
Diffstat (limited to 'src')
-rw-r--r--src/monoize.sml32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/monoize.sml b/src/monoize.sml
index 3998a49f..b92b9c70 100644
--- a/src/monoize.sml
+++ b/src/monoize.sml
@@ -1587,6 +1587,28 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
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 @@ fun monoExp (env, st, fm) (all as (e, loc)) =
((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)