diff options
author | 2009-03-29 11:37:29 -0400 | |
---|---|---|
committer | 2009-03-29 11:37:29 -0400 | |
commit | 6217967a353bc9d97ae45c2af495b653a47e2481 (patch) | |
tree | bae33dd5ebd8393e6dd1b30f7d1a2b75241c9956 /src/jscomp.sml | |
parent | 213564f740d896c9a8bd86b5e2221d9434b126d3 (diff) |
Redo channels, making them single-client
Diffstat (limited to 'src/jscomp.sml')
-rw-r--r-- | src/jscomp.sml | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/jscomp.sml b/src/jscomp.sml index f5627e24..a487eeab 100644 --- a/src/jscomp.sml +++ b/src/jscomp.sml @@ -49,7 +49,6 @@ val funcs = [(("Basis", "alert"), "alert"), (("Basis", "urlifyInt"), "ts"), (("Basis", "urlifyFloat"), "ts"), (("Basis", "urlifyString"), "uf"), - (("Basis", "urlifyChannel"), "ts"), (("Basis", "recv"), "rv")] structure FM = BinaryMapFn(struct @@ -220,7 +219,7 @@ fun process file = | TFfi ("Basis", "string") => ((EFfiApp ("Basis", "jsifyString", [e]), loc), st) | TFfi ("Basis", "int") => ((EFfiApp ("Basis", "htmlifyInt", [e]), loc), st) | TFfi ("Basis", "float") => ((EFfiApp ("Basis", "htmlifyFloat", [e]), loc), st) - | TFfi ("Basis", "channel") => ((EFfiApp ("Basis", "htmlifyChannel", [e]), loc), st) + | TFfi ("Basis", "channel") => ((EFfiApp ("Basis", "jsifyChannel", [e]), loc), st) | TFfi ("Basis", "bool") => ((ECase (e, [((PCon (Enum, PConFfi {mod = "Basis", @@ -348,7 +347,7 @@ fun process file = | 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", "channel") => ("(t[i++].length > 0 ? parseInt(t[i]) : null)", st) | TFfi ("Basis", "bool") => ("t[i++] == \"True\"", st) |