comparison src/jscomp.sml @ 586:1c969230ee7f

Reactive bool
author Adam Chlipala <adamc@hcoop.net>
date Thu, 01 Jan 2009 11:13:08 -0500
parents 35471f067980
children 4c899701bd28
comparison
equal deleted inserted replaced
585:35471f067980 586:1c969230ee7f
32 structure EM = ErrorMsg 32 structure EM = ErrorMsg
33 structure E = MonoEnv 33 structure E = MonoEnv
34 structure U = MonoUtil 34 structure U = MonoUtil
35 35
36 val funcs = [(("Basis", "alert"), "alert"), 36 val funcs = [(("Basis", "alert"), "alert"),
37 (("Basis", "htmlifyBool"), "bs"),
37 (("Basis", "htmlifyFloat"), "ts"), 38 (("Basis", "htmlifyFloat"), "ts"),
38 (("Basis", "htmlifyInt"), "ts"), 39 (("Basis", "htmlifyInt"), "ts"),
39 (("Basis", "htmlifyString"), "escape"), 40 (("Basis", "htmlifyString"), "escape"),
40 (("Basis", "new_client_source"), "sc"), 41 (("Basis", "new_client_source"), "sc"),
41 (("Basis", "set_client_source"), "sv")] 42 (("Basis", "set_client_source"), "sv")]
108 fun var n = Int.toString (len + inner - n - 1) 109 fun var n = Int.toString (len + inner - n - 1)
109 110
110 fun patCon pc = 111 fun patCon pc =
111 case pc of 112 case pc of
112 PConVar n => str (Int.toString n) 113 PConVar n => str (Int.toString n)
114 | PConFfi {mod = "Basis", con = "True", ...} => str "true"
115 | PConFfi {mod = "Basis", con = "False", ...} => str "false"
113 | PConFfi {con, ...} => str ("\"_" ^ con ^ "\"") 116 | PConFfi {con, ...} => str ("\"_" ^ con ^ "\"")
114 117
115 fun isNullable (t, _) = 118 fun isNullable (t, _) =
116 case t of 119 case t of
117 TOption _ => true 120 TOption _ => true