comparison src/monoize.sml @ 749:16bfd9e244cd

INNER JOIN
author Adam Chlipala <adamc@hcoop.net>
date Tue, 28 Apr 2009 10:11:56 -0400
parents 5f9b9972e6b8
children 059074c8d2fc
comparison
equal deleted inserted replaced
748:5f9b9972e6b8 749:16bfd9e244cd
1724 ((L'.EAbs ("tab1", s, (L'.TFun (s, s), loc), 1724 ((L'.EAbs ("tab1", s, (L'.TFun (s, s), loc),
1725 (L'.EAbs ("tab2", s, s, 1725 (L'.EAbs ("tab2", s, s,
1726 strcat [(L'.ERel 1, loc), 1726 strcat [(L'.ERel 1, loc),
1727 (L'.EPrim (Prim.String ", "), loc), 1727 (L'.EPrim (Prim.String ", "), loc),
1728 (L'.ERel 0, loc)]), loc)), loc), 1728 (L'.ERel 0, loc)]), loc)), loc),
1729 fm)
1730 end
1731 | L.ECApp ((L.ECApp ((L.EFfi ("Basis", "sql_inner_join"), _), _), _), _) =>
1732 let
1733 val s = (L'.TFfi ("Basis", "string"), loc)
1734 in
1735 ((L'.EAbs ("tab1", s, (L'.TFun (s, (L'.TFun (s, s), loc)), loc),
1736 (L'.EAbs ("tab2", s, (L'.TFun (s, s), loc),
1737 (L'.EAbs ("on", s, s,
1738 strcat [(L'.EPrim (Prim.String "("), loc),
1739 (L'.ERel 2, loc),
1740 (L'.EPrim (Prim.String " JOIN "), loc),
1741 (L'.ERel 1, loc),
1742 (L'.EPrim (Prim.String " ON "), loc),
1743 (L'.ERel 0, loc),
1744 (L'.EPrim (Prim.String ")"), loc)]), loc)), loc)), loc),
1729 fm) 1745 fm)
1730 end 1746 end
1731 1747
1732 | L.ECApp ((L.ECApp ((L.EFfi ("Basis", "sql_order_by_Nil"), _), _), _), _) => 1748 | L.ECApp ((L.ECApp ((L.EFfi ("Basis", "sql_order_by_Nil"), _), _), _), _) =>
1733 ((L'.EPrim (Prim.String ""), loc), fm) 1749 ((L'.EPrim (Prim.String ""), loc), fm)