Mercurial > urweb
comparison src/monoize.sml @ 2280:985c8016b592
Merge.
author | Ziv Scully <ziv@mit.edu> |
---|---|
date | Thu, 12 Nov 2015 08:46:51 -0500 |
parents | bbcf9ba9b39a 849404a3af27 |
children |
comparison
equal
deleted
inserted
replaced
2279:32a407902d3b | 2280:985c8016b592 |
---|---|
2304 (L.ECApp ( | 2304 (L.ECApp ( |
2305 (L.EFfi ("Basis", "sql_binary"), _), | 2305 (L.EFfi ("Basis", "sql_binary"), _), |
2306 _), _), | 2306 _), _), |
2307 _), _), | 2307 _), _), |
2308 _), _), | 2308 _), _), |
2309 _), _), | 2309 arg1), _), |
2310 _), _), | 2310 _), _), |
2311 _) => | 2311 _) => |
2312 let | 2312 let |
2313 val s = (L'.TFfi ("Basis", "string"), loc) | 2313 val s = (L'.TFfi ("Basis", "string"), loc) |
2314 | |
2315 val default = strcat [str "(", | |
2316 (L'.ERel 1, loc), | |
2317 str " ", | |
2318 (L'.ERel 2, loc), | |
2319 str " ", | |
2320 (L'.ERel 0, loc), | |
2321 str ")"] | |
2322 | |
2323 val body = case #1 arg1 of | |
2324 L.CApp ((L.CFfi ("Basis", "option"), _), _) => | |
2325 (L'.ECase ((L'.ERel 2, loc), | |
2326 [((L'.PPrim (Prim.String (Prim.Normal, "=")), loc), | |
2327 strcat [str "((", | |
2328 (L'.ERel 1, loc), | |
2329 str " ", | |
2330 (L'.ERel 2, loc), | |
2331 str " ", | |
2332 (L'.ERel 0, loc), | |
2333 str ") OR ((", | |
2334 (L'.ERel 1, loc), | |
2335 str ") IS NULL AND (", | |
2336 (L'.ERel 0, loc), | |
2337 str ") IS NULL))"]), | |
2338 ((L'.PWild, loc), | |
2339 default)], | |
2340 {disc = s, | |
2341 result = s}), loc) | |
2342 | _ => default | |
2314 in | 2343 in |
2315 ((L'.EAbs ("c", s, (L'.TFun (s, (L'.TFun (s, s), loc)), loc), | 2344 ((L'.EAbs ("c", s, (L'.TFun (s, (L'.TFun (s, s), loc)), loc), |
2316 (L'.EAbs ("e1", s, (L'.TFun (s, s), loc), | 2345 (L'.EAbs ("e1", s, (L'.TFun (s, s), loc), |
2317 (L'.EAbs ("e2", s, s, | 2346 (L'.EAbs ("e2", s, s, |
2318 strcat [str "(", | 2347 body), loc)), loc)), loc), |
2319 (L'.ERel 1, loc), | |
2320 str " ", | |
2321 (L'.ERel 2, loc), | |
2322 str " ", | |
2323 (L'.ERel 0, loc), | |
2324 str ")"]), loc)), loc)), loc), | |
2325 fm) | 2348 fm) |
2326 end | 2349 end |
2327 | L.EFfi ("Basis", "sql_and") => (str "AND", fm) | 2350 | L.EFfi ("Basis", "sql_and") => (str "AND", fm) |
2328 | L.EFfi ("Basis", "sql_or") => (str "OR", fm) | 2351 | L.EFfi ("Basis", "sql_or") => (str "OR", fm) |
2329 | 2352 |