Mercurial > urweb
comparison src/monoize.sml @ 1266:459a334345ae
-moduleOf command-line option; compatibility fixes and better error messages for SQLite
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 27 May 2010 16:36:17 -0400 |
parents | beb67ff4c8a0 |
children | 56bd4a4f6e66 |
comparison
equal
deleted
inserted
replaced
1265:e8d68fd8ed4b | 1266:459a334345ae |
---|---|
1898 strcat [sc " FROM ", | 1898 strcat [sc " FROM ", |
1899 (L'.ERel 0, loc)])], | 1899 (L'.ERel 0, loc)])], |
1900 {disc = s, | 1900 {disc = s, |
1901 result = s}), loc), | 1901 result = s}), loc), |
1902 (L'.ECase (gf "Where", | 1902 (L'.ECase (gf "Where", |
1903 [((L'.PPrim (Prim.String "TRUE"), loc), | 1903 [((L'.PPrim (Prim.String (#trueString (Settings.currentDbms ()))), |
1904 loc), | |
1904 sc ""), | 1905 sc ""), |
1905 ((L'.PWild, loc), | 1906 ((L'.PWild, loc), |
1906 strcat [sc " WHERE ", gf "Where"])], | 1907 strcat [sc " WHERE ", gf "Where"])], |
1907 {disc = s, | 1908 {disc = s, |
1908 result = s}), loc), | 1909 result = s}), loc), |
2112 [((L'.PRecord [("1", (L'.PPrim (Prim.String ""), loc), s)], loc), | 2113 [((L'.PRecord [("1", (L'.PPrim (Prim.String ""), loc), s)], loc), |
2113 (L'.ERel 1, loc)), | 2114 (L'.ERel 1, loc)), |
2114 ((L'.PRecord [("2", (L'.PPrim (Prim.String ""), loc), s)], loc), | 2115 ((L'.PRecord [("2", (L'.PPrim (Prim.String ""), loc), s)], loc), |
2115 (L'.ERel 2, loc)), | 2116 (L'.ERel 2, loc)), |
2116 ((L'.PWild, loc), | 2117 ((L'.PWild, loc), |
2117 strcat [(L'.EPrim (Prim.String "("), loc), | 2118 strcat ((if #nestedRelops |
2118 (L'.ERel 2, loc), | 2119 (Settings.currentDbms ()) then |
2119 (L'.EPrim (Prim.String " JOIN "), loc), | 2120 [(L'.EPrim (Prim.String "("), loc)] |
2120 (L'.ERel 1, loc), | 2121 else |
2121 (L'.EPrim (Prim.String " ON "), loc), | 2122 []) |
2122 (L'.ERel 0, loc), | 2123 @ [(L'.ERel 2, loc), |
2123 (L'.EPrim (Prim.String ")"), loc)])], | 2124 (L'.EPrim (Prim.String " JOIN "), loc), |
2125 (L'.ERel 1, loc), | |
2126 (L'.EPrim (Prim.String " ON "), loc), | |
2127 (L'.ERel 0, loc)] | |
2128 @ (if #nestedRelops | |
2129 (Settings.currentDbms ()) then | |
2130 [(L'.EPrim (Prim.String ")"), loc)] | |
2131 else | |
2132 [])))], | |
2124 {disc = (L'.TRecord [("1", s), ("2", s)], loc), | 2133 {disc = (L'.TRecord [("1", s), ("2", s)], loc), |
2125 result = s}), loc)), loc)), loc)), loc), | 2134 result = s}), loc)), loc)), loc)), loc), |
2126 fm) | 2135 fm) |
2127 end | 2136 end |
2128 | L.ECApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "sql_left_join"), _), _), _), _), _), | 2137 | L.ECApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "sql_left_join"), _), _), _), _), _), |
2142 (L'.ERel 1, loc)), | 2151 (L'.ERel 1, loc)), |
2143 ((L'.PRecord [("2", (L'.PPrim (Prim.String ""), | 2152 ((L'.PRecord [("2", (L'.PPrim (Prim.String ""), |
2144 loc), s)], loc), | 2153 loc), s)], loc), |
2145 (L'.ERel 2, loc)), | 2154 (L'.ERel 2, loc)), |
2146 ((L'.PWild, loc), | 2155 ((L'.PWild, loc), |
2147 strcat [(L'.EPrim (Prim.String "("), loc), | 2156 strcat ((if #nestedRelops |
2148 (L'.ERel 2, loc), | 2157 (Settings.currentDbms ()) then |
2149 (L'.EPrim (Prim.String " LEFT JOIN "), loc), | 2158 [(L'.EPrim (Prim.String "("), loc)] |
2150 (L'.ERel 1, loc), | 2159 else |
2151 (L'.EPrim (Prim.String " ON "), loc), | 2160 []) |
2152 (L'.ERel 0, loc), | 2161 @ [(L'.ERel 2, loc), |
2153 (L'.EPrim (Prim.String ")"), loc)])], | 2162 (L'.EPrim (Prim.String " LEFT JOIN "), |
2163 loc), | |
2164 (L'.ERel 1, loc), | |
2165 (L'.EPrim (Prim.String " ON "), loc), | |
2166 (L'.ERel 0, loc)] | |
2167 @ (if #nestedRelops | |
2168 (Settings.currentDbms ()) then | |
2169 [(L'.EPrim (Prim.String ")"), loc)] | |
2170 else | |
2171 [])))], | |
2154 {disc = (L'.TRecord [("1", s), ("2", s)], loc), | 2172 {disc = (L'.TRecord [("1", s), ("2", s)], loc), |
2155 result = s}), loc)), loc)), loc)), loc)), loc), | 2173 result = s}), loc)), loc)), loc)), loc)), loc), |
2156 fm) | 2174 fm) |
2157 end | 2175 end |
2158 | L.ECApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "sql_right_join"), _), (L.CRecord (_, left), _)), | 2176 | L.ECApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "sql_right_join"), _), (L.CRecord (_, left), _)), |
2172 (L'.ERel 1, loc)), | 2190 (L'.ERel 1, loc)), |
2173 ((L'.PRecord [("2", (L'.PPrim (Prim.String ""), | 2191 ((L'.PRecord [("2", (L'.PPrim (Prim.String ""), |
2174 loc), s)], loc), | 2192 loc), s)], loc), |
2175 (L'.ERel 2, loc)), | 2193 (L'.ERel 2, loc)), |
2176 ((L'.PWild, loc), | 2194 ((L'.PWild, loc), |
2177 strcat [(L'.EPrim (Prim.String "("), loc), | 2195 strcat ((if #nestedRelops |
2178 (L'.ERel 2, loc), | 2196 (Settings.currentDbms ()) then |
2179 (L'.EPrim (Prim.String " RIGHT JOIN "), loc), | 2197 [(L'.EPrim (Prim.String "("), loc)] |
2180 (L'.ERel 1, loc), | 2198 else |
2181 (L'.EPrim (Prim.String " ON "), loc), | 2199 []) |
2182 (L'.ERel 0, loc), | 2200 @ [(L'.ERel 2, loc), |
2183 (L'.EPrim (Prim.String ")"), loc)])], | 2201 (L'.EPrim (Prim.String " RIGHT JOIN "), |
2202 loc), | |
2203 (L'.ERel 1, loc), | |
2204 (L'.EPrim (Prim.String " ON "), loc), | |
2205 (L'.ERel 0, loc)] | |
2206 @ (if #nestedRelops | |
2207 (Settings.currentDbms ()) then | |
2208 [(L'.EPrim (Prim.String ")"), loc)] | |
2209 else | |
2210 [])))], | |
2184 {disc = (L'.TRecord [("1", s), ("2", s)], loc), | 2211 {disc = (L'.TRecord [("1", s), ("2", s)], loc), |
2185 result = s}), loc)), loc)), loc)), loc)), loc), | 2212 result = s}), loc)), loc)), loc)), loc)), loc), |
2186 fm) | 2213 fm) |
2187 end | 2214 end |
2188 | L.ECApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "sql_full_join"), _), (L.CRecord (_, left), _)), _), | 2215 | L.ECApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "sql_full_join"), _), (L.CRecord (_, left), _)), _), |
2202 (L'.ERel 1, loc)), | 2229 (L'.ERel 1, loc)), |
2203 ((L'.PRecord [("2", (L'.PPrim (Prim.String ""), | 2230 ((L'.PRecord [("2", (L'.PPrim (Prim.String ""), |
2204 loc), s)], loc), | 2231 loc), s)], loc), |
2205 (L'.ERel 2, loc)), | 2232 (L'.ERel 2, loc)), |
2206 ((L'.PWild, loc), | 2233 ((L'.PWild, loc), |
2207 strcat [(L'.EPrim (Prim.String "("), loc), | 2234 strcat ((if #nestedRelops |
2208 (L'.ERel 2, loc), | 2235 (Settings.currentDbms ()) then |
2209 (L'.EPrim (Prim.String " FULL JOIN "), loc), | 2236 [(L'.EPrim (Prim.String "("), loc)] |
2210 (L'.ERel 1, loc), | 2237 else |
2211 (L'.EPrim (Prim.String " ON "), loc), | 2238 []) |
2212 (L'.ERel 0, loc), | 2239 @ [(L'.ERel 2, loc), |
2213 (L'.EPrim (Prim.String ")"), loc)])], | 2240 (L'.EPrim (Prim.String " FULL JOIN "), |
2241 loc), | |
2242 (L'.ERel 1, loc), | |
2243 (L'.EPrim (Prim.String " ON "), loc), | |
2244 (L'.ERel 0, loc)] | |
2245 @ (if #nestedRelops | |
2246 (Settings.currentDbms ()) then | |
2247 [(L'.EPrim (Prim.String ")"), loc)] | |
2248 else | |
2249 [])))], | |
2214 {disc = (L'.TRecord [("1", s), ("2", s)], loc), | 2250 {disc = (L'.TRecord [("1", s), ("2", s)], loc), |
2215 result = s}), loc)), loc)), loc)), loc)), loc), | 2251 result = s}), loc)), loc)), loc)), loc)), loc), |
2216 fm) | 2252 fm) |
2217 end | 2253 end |
2218 | 2254 |