comparison src/monoize.sml @ 467:3f1b9231a37b

Inserted a NULL value
author Adam Chlipala <adamc@hcoop.net>
date Thu, 06 Nov 2008 15:37:38 -0500
parents 1626dcba13ee
children 4efab85405be
comparison
equal deleted inserted replaced
466:1626dcba13ee 467:3f1b9231a37b
980 end 980 end
981 981
982 | L.EFfiApp ("Basis", "dml", [e]) => 982 | L.EFfiApp ("Basis", "dml", [e]) =>
983 let 983 let
984 val (e, fm) = monoExp (env, st, fm) e 984 val (e, fm) = monoExp (env, st, fm) e
985 val un = (L'.TRecord [], loc) 985 in
986 in 986 ((L'.EDml (liftExpInExp 0 e), loc),
987 ((L'.EAbs ("_", un, un,
988 (L'.EDml (liftExpInExp 0 e), loc)), loc),
989 fm) 987 fm)
990 end 988 end
991 989
992 | L.ECApp ((L.EFfi ("Basis", "insert"), _), fields) => 990 | L.ECApp ((L.EFfi ("Basis", "insert"), _), fields) =>
993 (case monoType env (L.TRecord fields, loc) of 991 (case monoType env (L.TRecord fields, loc) of
1272 fm) 1270 fm)
1273 | L.EFfi ("Basis", "sql_time") => 1271 | L.EFfi ("Basis", "sql_time") =>
1274 ((L'.EAbs ("x", (L'.TFfi ("Basis", "time"), loc), (L'.TFfi ("Basis", "string"), loc), 1272 ((L'.EAbs ("x", (L'.TFfi ("Basis", "time"), loc), (L'.TFfi ("Basis", "string"), loc),
1275 (L'.EFfiApp ("Basis", "sqlifyTime", [(L'.ERel 0, loc)]), loc)), loc), 1273 (L'.EFfiApp ("Basis", "sqlifyTime", [(L'.ERel 0, loc)]), loc)), loc),
1276 fm) 1274 fm)
1275 | L.EFfi ("Basis", "sql_option_int") =>
1276 ((L'.EAbs ("x", (L'.TOption (L'.TFfi ("Basis", "int"), loc), loc), (L'.TFfi ("Basis", "string"), loc),
1277 (L'.EFfiApp ("Basis", "sqlifyIntN", [(L'.ERel 0, loc)]), loc)), loc),
1278 fm)
1279 | L.EFfi ("Basis", "sql_option_float") =>
1280 ((L'.EAbs ("x", (L'.TOption (L'.TFfi ("Basis", "float"), loc), loc), (L'.TFfi ("Basis", "string"), loc),
1281 (L'.EFfiApp ("Basis", "sqlifyFloatN", [(L'.ERel 0, loc)]), loc)), loc),
1282 fm)
1283 | L.EFfi ("Basis", "sql_option_bool") =>
1284 ((L'.EAbs ("x", (L'.TOption (L'.TFfi ("Basis", "bool"), loc), loc), (L'.TFfi ("Basis", "string"), loc),
1285 (L'.EFfiApp ("Basis", "sqlifyBoolN", [(L'.ERel 0, loc)]), loc)), loc),
1286 fm)
1287 | L.EFfi ("Basis", "sql_option_string") =>
1288 ((L'.EAbs ("x", (L'.TOption (L'.TFfi ("Basis", "string"), loc), loc), (L'.TFfi ("Basis", "string"), loc),
1289 (L'.EFfiApp ("Basis", "sqlifyStringN", [(L'.ERel 0, loc)]), loc)), loc),
1290 fm)
1291 | L.EFfi ("Basis", "sql_option_time") =>
1292 ((L'.EAbs ("x", (L'.TOption (L'.TFfi ("Basis", "time"), loc), loc), (L'.TFfi ("Basis", "string"), loc),
1293 (L'.EFfiApp ("Basis", "sqlifyTimeN", [(L'.ERel 0, loc)]), loc)), loc),
1294 fm)
1277 1295
1278 | L.ECApp ((L.EFfi ("Basis", "sql_subset"), _), _) => 1296 | L.ECApp ((L.EFfi ("Basis", "sql_subset"), _), _) =>
1279 ((L'.ERecord [], loc), fm) 1297 ((L'.ERecord [], loc), fm)
1280 | L.ECApp ((L.EFfi ("Basis", "sql_subset_all"), _), _) => 1298 | L.ECApp ((L.EFfi ("Basis", "sql_subset_all"), _), _) =>
1281 ((L'.ERecord [], loc), fm) 1299 ((L'.ERecord [], loc), fm)