Mercurial > urweb
diff src/jscomp.sml @ 679:44f23712020d
Chat example working nicely, but without dead channel removal
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 26 Mar 2009 18:26:50 -0400 |
parents | f73913d97a40 |
children | 5bbb542243e8 |
line wrap: on
line diff
--- a/src/jscomp.sml Thu Mar 26 16:22:34 2009 -0400 +++ b/src/jscomp.sml Thu Mar 26 18:26:50 2009 -0400 @@ -48,7 +48,7 @@ (("Basis", "stringToInt_error"), "pi"), (("Basis", "urlifyInt"), "ts"), (("Basis", "urlifyFloat"), "ts"), - (("Basis", "urlifyString"), "escape"), + (("Basis", "urlifyString"), "uf"), (("Basis", "urlifyChannel"), "ts"), (("Basis", "recv"), "rv")] @@ -345,9 +345,10 @@ @ ["}"]), st) end - | TFfi ("Basis", "string") => ("unesc(t[i++])", st) + | TFfi ("Basis", "string") => ("uu(t[i++])", st) | TFfi ("Basis", "int") => ("parseInt(t[i++])", st) | TFfi ("Basis", "float") => ("parseFloat(t[i++])", st) + | TFfi ("Basis", "channel") => ("parseInt(t[i++])", st) | TFfi ("Basis", "bool") => ("t[i++] == \"True\"", st) @@ -806,14 +807,14 @@ end | ECase (e', pes, {result, ...}) => - if closedUpto inner e andalso List.all (fn (_, e) => closedUpto inner e) pes then + (*if closedUpto inner e andalso List.all (fn (_, e) => closedUpto inner e) pes then let val (e', st) = quoteExp result ((ERel 0, loc), st) in ((ELet ("js", result, e, e'), loc), st) end - else + else*) let val plen = length pes