Mercurial > urweb
comparison src/monoize.sml @ 682:5bbb542243e8
Redo channels, making them single-client
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 29 Mar 2009 11:37:29 -0400 |
parents | 44f23712020d |
children | 9a2c18dab11d |
comparison
equal
deleted
inserted
replaced
681:6c9b8875f347 | 682:5bbb542243e8 |
---|---|
1108 | 1108 |
1109 | L.ECApp ((L.EFfi ("Basis", "channel"), _), t) => | 1109 | L.ECApp ((L.EFfi ("Basis", "channel"), _), t) => |
1110 ((L'.EAbs ("_", (L'.TRecord [], loc), (L'.TFfi ("Basis", "channel"), loc), | 1110 ((L'.EAbs ("_", (L'.TRecord [], loc), (L'.TFfi ("Basis", "channel"), loc), |
1111 (L'.EFfiApp ("Basis", "new_channel", [(L'.ERecord [], loc)]), loc)), loc), | 1111 (L'.EFfiApp ("Basis", "new_channel", [(L'.ERecord [], loc)]), loc)), loc), |
1112 fm) | 1112 fm) |
1113 | L.ECApp ((L.EFfi ("Basis", "subscribe"), _), t) => | |
1114 ((L'.EAbs ("ch", (L'.TFfi ("Basis", "channel"), loc), | |
1115 (L'.TFun ((L'.TRecord [], loc), (L'.TRecord [], loc)), loc), | |
1116 (L'.EAbs ("_", (L'.TRecord [], loc), (L'.TRecord [], loc), | |
1117 (L'.EFfiApp ("Basis", "subscribe", | |
1118 [(L'.ERel 1, loc)]), | |
1119 loc)), loc)), loc), | |
1120 fm) | |
1121 | L.ECApp ((L.EFfi ("Basis", "send"), _), t) => | 1113 | L.ECApp ((L.EFfi ("Basis", "send"), _), t) => |
1122 let | 1114 let |
1123 val t = monoType env t | 1115 val t = monoType env t |
1124 val (e, fm) = urlifyExp env fm ((L'.ERel 1, loc), t) | 1116 val (e, fm) = urlifyExp env fm ((L'.ERel 1, loc), t) |
1125 in | 1117 in |
1429 fm) | 1421 fm) |
1430 | L.ECApp ((L.EFfi ("Basis", "sql_channel"), _), _) => | 1422 | L.ECApp ((L.EFfi ("Basis", "sql_channel"), _), _) => |
1431 ((L'.EAbs ("x", (L'.TFfi ("Basis", "channel"), loc), (L'.TFfi ("Basis", "string"), loc), | 1423 ((L'.EAbs ("x", (L'.TFfi ("Basis", "channel"), loc), (L'.TFfi ("Basis", "string"), loc), |
1432 (L'.EFfiApp ("Basis", "sqlifyChannel", [(L'.ERel 0, loc)]), loc)), loc), | 1424 (L'.EFfiApp ("Basis", "sqlifyChannel", [(L'.ERel 0, loc)]), loc)), loc), |
1433 fm) | 1425 fm) |
1426 | L.EFfi ("Basis", "sql_client") => | |
1427 ((L'.EAbs ("x", (L'.TFfi ("Basis", "client"), loc), (L'.TFfi ("Basis", "string"), loc), | |
1428 (L'.EFfiApp ("Basis", "sqlifyClient", [(L'.ERel 0, loc)]), loc)), loc), | |
1429 fm) | |
1434 | L.ECApp ((L.EFfi ("Basis", "sql_prim"), _), t) => | 1430 | L.ECApp ((L.EFfi ("Basis", "sql_prim"), _), t) => |
1435 let | 1431 let |
1436 val t = monoType env t | 1432 val t = monoType env t |
1437 val tf = (L'.TFun (t, (L'.TFfi ("Basis", "string"), loc)), loc) | 1433 val tf = (L'.TFun (t, (L'.TFfi ("Basis", "string"), loc)), loc) |
1438 in | 1434 in |