aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/jscomp.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2011-02-08 16:54:01 -0500
committerGravatar Adam Chlipala <adam@chlipala.net>2011-02-08 16:54:01 -0500
commit7db27b06d50316f07bb38ddc5999d086be911ed2 (patch)
tree2f0fd30447bf7a6e3fb40aead813c7feeed11833 /src/jscomp.sml
parent58c927541d3960c0bca5636c05e499246d3cecef (diff)
Notice that Basis.now is effectful; smarter JavaScript encoding of initial source values built using server-side expressions that can't be turned into JavaScript
Diffstat (limited to 'src/jscomp.sml')
-rw-r--r--src/jscomp.sml12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/jscomp.sml b/src/jscomp.sml
index 2c00e04c..cd08cc0d 100644
--- a/src/jscomp.sml
+++ b/src/jscomp.sml
@@ -1186,6 +1186,18 @@ fun process file =
((EUnurlify (e, t, b), loc), st)
end
+ | EJavaScript (m as Source t, e') =>
+ (foundJavaScript := true;
+ let
+ val (x', st) = jsExp m (t :: outer) ((ERel 0, loc), st)
+ in
+ ((ELet ("x", t, e', x'), loc), st)
+ end
+ handle CantEmbed t => ((*ErrorMsg.errorAt loc "Unable to embed type in JavaScript";
+ Print.preface ("Type",
+ MonoPrint.p_typ MonoEnv.empty t);*)
+ (e, st)))
+
| EJavaScript (m, e') =>
(foundJavaScript := true;
jsExp m outer (e', st)