comparison src/monoize.sml @ 577:3d56940120b1

Setting a source server-side
author Adam Chlipala <adamc@hcoop.net>
date Tue, 30 Dec 2008 10:49:42 -0500
parents 9f02f1765149
children 1e589a60b86f
comparison
equal deleted inserted replaced
576:813f1e78d9d0 577:3d56940120b1
132 (L'.TFfi ("Basis", "string"), loc) 132 (L'.TFfi ("Basis", "string"), loc)
133 133
134 | L.CApp ((L.CFfi ("Basis", "transaction"), _), t) => 134 | L.CApp ((L.CFfi ("Basis", "transaction"), _), t) =>
135 (L'.TFun ((L'.TRecord [], loc), mt env dtmap t), loc) 135 (L'.TFun ((L'.TRecord [], loc), mt env dtmap t), loc)
136 | L.CApp ((L.CFfi ("Basis", "source"), _), t) => 136 | L.CApp ((L.CFfi ("Basis", "source"), _), t) =>
137 (L'.TFfi ("Basis", "int"), loc) 137 (L'.TSource, loc)
138 | L.CApp ((L.CFfi ("Basis", "signal"), _), t) => 138 | L.CApp ((L.CFfi ("Basis", "signal"), _), t) =>
139 (L'.TSignal (mt env dtmap t), loc) 139 (L'.TSignal (mt env dtmap t), loc)
140 | L.CApp ((L.CFfi ("Basis", "http_cookie"), _), _) => 140 | L.CApp ((L.CFfi ("Basis", "http_cookie"), _), _) =>
141 (L'.TFfi ("Basis", "string"), loc) 141 (L'.TFfi ("Basis", "string"), loc)
142 | L.CApp ((L.CFfi ("Basis", "sql_table"), _), _) => 142 | L.CApp ((L.CFfi ("Basis", "sql_table"), _), _) =>
971 971
972 | L.ECApp ((L.EFfi ("Basis", "source"), _), t) => 972 | L.ECApp ((L.EFfi ("Basis", "source"), _), t) =>
973 let 973 let
974 val t = monoType env t 974 val t = monoType env t
975 in 975 in
976 ((L'.EAbs ("x", t, (L'.TFun ((L'.TRecord [], loc), (L'.TFfi ("Basis", "int"), loc)), loc), 976 ((L'.EAbs ("x", t, (L'.TFun ((L'.TRecord [], loc), (L'.TSource, loc)), loc),
977 (L'.EAbs ("_", (L'.TRecord [], loc), (L'.TFfi ("Basis", "int"), loc), 977 (L'.EAbs ("_", (L'.TRecord [], loc), (L'.TSource, loc),
978 (L'.EFfiApp ("Basis", "new_client_source", [(L'.ERel 1, loc)]), loc)), loc)), 978 (L'.EFfiApp ("Basis", "new_client_source",
979 [(L'.EJavaScript (L'.File, (L'.ERel 1, loc)), loc)]), loc)), loc)),
979 loc), 980 loc),
980 fm) 981 fm)
981 end 982 end
982 | L.ECApp ((L.EFfi ("Basis", "set"), _), t) => 983 | L.ECApp ((L.EFfi ("Basis", "set"), _), t) =>
983 let 984 let
984 val t = monoType env t 985 val t = monoType env t
985 in 986 in
986 ((L'.EAbs ("src", (L'.TFfi ("Basis", "int"), loc), 987 ((L'.EAbs ("src", (L'.TSource, loc),
987 (L'.TFun (t, (L'.TFun ((L'.TRecord [], loc), (L'.TRecord [], loc)), loc)), loc), 988 (L'.TFun (t, (L'.TFun ((L'.TRecord [], loc), (L'.TRecord [], loc)), loc)), loc),
988 (L'.EAbs ("v", t, (L'.TFun ((L'.TRecord [], loc), (L'.TRecord [], loc)), loc), 989 (L'.EAbs ("v", t, (L'.TFun ((L'.TRecord [], loc), (L'.TRecord [], loc)), loc),
989 (L'.EAbs ("_", (L'.TRecord [], loc), (L'.TRecord [], loc), 990 (L'.EAbs ("_", (L'.TRecord [], loc), (L'.TRecord [], loc),
990 (L'.EFfiApp ("Basis", "set_client_source", 991 (L'.EFfiApp ("Basis", "set_client_source",
991 [(L'.ERel 2, loc), (L'.ERel 1, loc)]), 992 [(L'.ERel 2, loc),
993 (L'.EJavaScript (L'.File, (L'.ERel 1, loc)), loc)]),
992 loc)), loc)), loc)), loc), 994 loc)), loc)), loc)), loc),
993 fm) 995 fm)
994 end 996 end
995 997
996 | L.EApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "return"), _), _), _), t), _), 998 | L.EApp ((L.ECApp ((L.ECApp ((L.EFfi ("Basis", "return"), _), _), _), t), _),