comparison 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
comparison
equal deleted inserted replaced
1071:26197c957ad6 1072:9001966ae1c8
1582 (L'.EPrim (Prim.String " ("), loc), 1582 (L'.EPrim (Prim.String " ("), loc),
1583 (L'.EField ((L'.ERel 2, loc), "2"), loc), 1583 (L'.EField ((L'.ERel 2, loc), "2"), loc),
1584 (L'.EPrim (Prim.String ")"), loc), 1584 (L'.EPrim (Prim.String ")"), loc),
1585 prop ("OnDelete", "DELETE"), 1585 prop ("OnDelete", "DELETE"),
1586 prop ("OnUpdate", "UPDATE")]), loc)), loc)), loc), 1586 prop ("OnUpdate", "UPDATE")]), loc)), loc)), loc),
1587 fm)
1588 end
1589
1590 | L.ECApp (
1591 (L.ECApp (
1592 (L.ECApp (
1593 (L.ECApp (
1594 (L.ECApp (
1595 (L.ECApp (
1596 (L.ECApp (
1597 (L.EFfi ("Basis", "sql_exp_weaken"), _),
1598 _), _),
1599 _), _),
1600 _), _),
1601 _), _),
1602 _), _),
1603 _), _),
1604 _) =>
1605 let
1606 val string = (L'.TFfi ("Basis", "string"), loc)
1607 in
1608 ((L'.EAbs ("e", string, string, (L'.ERel 0, loc)), loc),
1587 fm) 1609 fm)
1588 end 1610 end
1589 1611
1590 | L.ECApp ((L.EFfi ("Basis", "check"), _), _) => 1612 | L.ECApp ((L.EFfi ("Basis", "check"), _), _) =>
1591 let 1613 let
1991 2013
1992 | L.ECApp ((L.EFfi ("Basis", "sql_subset"), _), _) => 2014 | L.ECApp ((L.EFfi ("Basis", "sql_subset"), _), _) =>
1993 ((L'.ERecord [], loc), fm) 2015 ((L'.ERecord [], loc), fm)
1994 | L.ECApp ((L.EFfi ("Basis", "sql_subset_all"), _), _) => 2016 | L.ECApp ((L.EFfi ("Basis", "sql_subset_all"), _), _) =>
1995 ((L'.ERecord [], loc), fm) 2017 ((L'.ERecord [], loc), fm)
2018 | L.ECApp ((L.ECApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "sql_subset_concat"),
2019 _), _), _), _), _), _), _), _) =>
2020 let
2021 val un = (L'.TRecord [], loc)
2022 in
2023 ((L'.EAbs ("_", un, (L'.TFun (un, un), loc),
2024 (L'.EAbs ("_", un, un,
2025 (L'.ERecord [], loc)), loc)), loc),
2026 fm)
2027 end
1996 2028
1997 | L.ECApp ((L.ECApp ((L.EFfi ("Basis", "fieldsOf_table"), _), _), _), _) => 2029 | L.ECApp ((L.ECApp ((L.EFfi ("Basis", "fieldsOf_table"), _), _), _), _) =>
1998 ((L'.ERecord [], loc), fm) 2030 ((L'.ERecord [], loc), fm)
1999 | L.ECApp ((L.EFfi ("Basis", "fieldsOf_view"), _), _) => 2031 | L.ECApp ((L.EFfi ("Basis", "fieldsOf_view"), _), _) =>
2000 ((L'.ERecord [], loc), fm) 2032 ((L'.ERecord [], loc), fm)