Mercurial > urweb
comparison src/jscomp.sml @ 682:5bbb542243e8
Redo channels, making them single-client
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 29 Mar 2009 11:37:29 -0400 |
parents | 44f23712020d |
children | cc58941da3e2 |
comparison
equal
deleted
inserted
replaced
681:6c9b8875f347 | 682:5bbb542243e8 |
---|---|
47 (("Basis", "stringToFloat_error"), "pfl"), | 47 (("Basis", "stringToFloat_error"), "pfl"), |
48 (("Basis", "stringToInt_error"), "pi"), | 48 (("Basis", "stringToInt_error"), "pi"), |
49 (("Basis", "urlifyInt"), "ts"), | 49 (("Basis", "urlifyInt"), "ts"), |
50 (("Basis", "urlifyFloat"), "ts"), | 50 (("Basis", "urlifyFloat"), "ts"), |
51 (("Basis", "urlifyString"), "uf"), | 51 (("Basis", "urlifyString"), "uf"), |
52 (("Basis", "urlifyChannel"), "ts"), | |
53 (("Basis", "recv"), "rv")] | 52 (("Basis", "recv"), "rv")] |
54 | 53 |
55 structure FM = BinaryMapFn(struct | 54 structure FM = BinaryMapFn(struct |
56 type ord_key = string * string | 55 type ord_key = string * string |
57 fun compare ((m1, x1), (m2, x2)) = | 56 fun compare ((m1, x1), (m2, x2)) = |
218 end | 217 end |
219 | 218 |
220 | TFfi ("Basis", "string") => ((EFfiApp ("Basis", "jsifyString", [e]), loc), st) | 219 | TFfi ("Basis", "string") => ((EFfiApp ("Basis", "jsifyString", [e]), loc), st) |
221 | TFfi ("Basis", "int") => ((EFfiApp ("Basis", "htmlifyInt", [e]), loc), st) | 220 | TFfi ("Basis", "int") => ((EFfiApp ("Basis", "htmlifyInt", [e]), loc), st) |
222 | TFfi ("Basis", "float") => ((EFfiApp ("Basis", "htmlifyFloat", [e]), loc), st) | 221 | TFfi ("Basis", "float") => ((EFfiApp ("Basis", "htmlifyFloat", [e]), loc), st) |
223 | TFfi ("Basis", "channel") => ((EFfiApp ("Basis", "htmlifyChannel", [e]), loc), st) | 222 | TFfi ("Basis", "channel") => ((EFfiApp ("Basis", "jsifyChannel", [e]), loc), st) |
224 | 223 |
225 | TFfi ("Basis", "bool") => ((ECase (e, | 224 | TFfi ("Basis", "bool") => ((ECase (e, |
226 [((PCon (Enum, PConFfi {mod = "Basis", | 225 [((PCon (Enum, PConFfi {mod = "Basis", |
227 datatyp = "bool", | 226 datatyp = "bool", |
228 con = "True", | 227 con = "True", |
346 end | 345 end |
347 | 346 |
348 | TFfi ("Basis", "string") => ("uu(t[i++])", st) | 347 | TFfi ("Basis", "string") => ("uu(t[i++])", st) |
349 | TFfi ("Basis", "int") => ("parseInt(t[i++])", st) | 348 | TFfi ("Basis", "int") => ("parseInt(t[i++])", st) |
350 | TFfi ("Basis", "float") => ("parseFloat(t[i++])", st) | 349 | TFfi ("Basis", "float") => ("parseFloat(t[i++])", st) |
351 | TFfi ("Basis", "channel") => ("parseInt(t[i++])", st) | 350 | TFfi ("Basis", "channel") => ("(t[i++].length > 0 ? parseInt(t[i]) : null)", st) |
352 | 351 |
353 | TFfi ("Basis", "bool") => ("t[i++] == \"True\"", st) | 352 | TFfi ("Basis", "bool") => ("t[i++] == \"True\"", st) |
354 | 353 |
355 | TOption t => | 354 | TOption t => |
356 let | 355 let |