diff 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
line wrap: on
line diff
--- a/src/monoize.sml	Tue Dec 30 09:43:45 2008 -0500
+++ b/src/monoize.sml	Tue Dec 30 10:49:42 2008 -0500
@@ -134,7 +134,7 @@
                   | L.CApp ((L.CFfi ("Basis", "transaction"), _), t) =>
                     (L'.TFun ((L'.TRecord [], loc), mt env dtmap t), loc)
                   | L.CApp ((L.CFfi ("Basis", "source"), _), t) =>
-                    (L'.TFfi ("Basis", "int"), loc)
+                    (L'.TSource, loc)
                   | L.CApp ((L.CFfi ("Basis", "signal"), _), t) =>
                     (L'.TSignal (mt env dtmap t), loc)
                   | L.CApp ((L.CFfi ("Basis", "http_cookie"), _), _) =>
@@ -973,9 +973,10 @@
             let
                 val t = monoType env t
             in
-                ((L'.EAbs ("x", t, (L'.TFun ((L'.TRecord [], loc), (L'.TFfi ("Basis", "int"), loc)), loc),
-                           (L'.EAbs ("_", (L'.TRecord [], loc), (L'.TFfi ("Basis", "int"), loc),
-                                     (L'.EFfiApp ("Basis", "new_client_source", [(L'.ERel 1, loc)]), loc)), loc)),
+                ((L'.EAbs ("x", t, (L'.TFun ((L'.TRecord [], loc), (L'.TSource, loc)), loc),
+                           (L'.EAbs ("_", (L'.TRecord [], loc), (L'.TSource, loc),
+                                     (L'.EFfiApp ("Basis", "new_client_source",
+                                                  [(L'.EJavaScript (L'.File, (L'.ERel 1, loc)), loc)]), loc)), loc)),
                   loc),
                  fm)
             end
@@ -983,12 +984,13 @@
             let
                 val t = monoType env t
             in
-                ((L'.EAbs ("src", (L'.TFfi ("Basis", "int"), loc),
+                ((L'.EAbs ("src", (L'.TSource, loc),
                            (L'.TFun (t, (L'.TFun ((L'.TRecord [], loc), (L'.TRecord [], loc)), loc)), loc),
                            (L'.EAbs ("v", t, (L'.TFun ((L'.TRecord [], loc), (L'.TRecord [], loc)), loc),
                                      (L'.EAbs ("_", (L'.TRecord [], loc), (L'.TRecord [], loc),
                                                (L'.EFfiApp ("Basis", "set_client_source",
-                                                            [(L'.ERel 2, loc), (L'.ERel 1, loc)]),
+                                                            [(L'.ERel 2, loc),
+                                                             (L'.EJavaScript (L'.File, (L'.ERel 1, loc)), loc)]),
                                                 loc)), loc)), loc)), loc),
                  fm)
             end