Mercurial > urweb
comparison src/jscomp.sml @ 729:7c6b6c3c7b79
Some client-side error handling
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 16 Apr 2009 13:47:20 -0400 |
parents | 6fc633d990e7 |
children | 796e42c93c48 |
comparison
equal
deleted
inserted
replaced
728:2197f0e24a9f | 729:7c6b6c3c7b79 |
---|---|
51 (("Basis", "urlifyString"), "uf"), | 51 (("Basis", "urlifyString"), "uf"), |
52 (("Basis", "recv"), "rv"), | 52 (("Basis", "recv"), "rv"), |
53 (("Basis", "strcat"), "cat"), | 53 (("Basis", "strcat"), "cat"), |
54 (("Basis", "intToString"), "ts"), | 54 (("Basis", "intToString"), "ts"), |
55 (("Basis", "floatToString"), "ts"), | 55 (("Basis", "floatToString"), "ts"), |
56 (("Basis", "onError"), "onError")] | 56 (("Basis", "onError"), "onError"), |
57 (("Basis", "onFail"), "onFail"), | |
58 (("Basis", "onConnectFail"), "onConnectFail"), | |
59 (("Basis", "onDisconnect"), "onDisconnect"), | |
60 (("Basis", "onServerError"), "onServerError")] | |
57 | 61 |
58 structure FM = BinaryMapFn(struct | 62 structure FM = BinaryMapFn(struct |
59 type ord_key = string * string | 63 type ord_key = string * string |
60 fun compare ((m1, x1), (m2, x2)) = | 64 fun compare ((m1, x1), (m2, x2)) = |
61 Order.join (String.compare (m1, m2), | 65 Order.join (String.compare (m1, m2), |
762 str ")"], | 766 str ")"], |
763 st) | 767 st) |
764 end | 768 end |
765 | EBinop (s, e1, e2) => | 769 | EBinop (s, e1, e2) => |
766 let | 770 let |
771 val s = | |
772 case s of | |
773 "!strcmp" => "==" | |
774 | _ => s | |
775 | |
767 val (e1, st) = jsE inner (e1, st) | 776 val (e1, st) = jsE inner (e1, st) |
768 val (e2, st) = jsE inner (e2, st) | 777 val (e2, st) = jsE inner (e2, st) |
769 in | 778 in |
770 (strcat [str "(", | 779 (strcat [str "(", |
771 e1, | 780 e1, |