comparison src/settings.sml @ 895:ae9e22822ec5

Key events get key code input
author Adam Chlipala <adamc@hcoop.net>
date Sat, 18 Jul 2009 12:53:26 -0400
parents 8f2159040bbb
children 5fe49effbc83
comparison
equal deleted inserted replaced
894:a3f58978ff32 895:ae9e22822ec5
89 "send", 89 "send",
90 "onError", 90 "onError",
91 "onFail", 91 "onFail",
92 "onConnectFail", 92 "onConnectFail",
93 "onDisconnect", 93 "onDisconnect",
94 "onServerError"] 94 "onServerError",
95 "kc"]
95 96
96 val effectful = ref effectfulBase 97 val effectful = ref effectfulBase
97 fun setEffectful ls = effectful := S.addList (effectfulBase, ls) 98 fun setEffectful ls = effectful := S.addList (effectfulBase, ls)
98 fun isEffectful x = S.member (!effectful, x) 99 fun isEffectful x = S.member (!effectful, x)
99 100
106 "spawn", 107 "spawn",
107 "onError", 108 "onError",
108 "onFail", 109 "onFail",
109 "onConnectFail", 110 "onConnectFail",
110 "onDisconnect", 111 "onDisconnect",
111 "onServerError"] 112 "onServerError",
113 "kc"]
112 val client = ref clientBase 114 val client = ref clientBase
113 fun setClientOnly ls = client := S.addList (clientBase, ls) 115 fun setClientOnly ls = client := S.addList (clientBase, ls)
114 fun isClientOnly x = S.member (!client, x) 116 fun isClientOnly x = S.member (!client, x)
115 117
116 val serverBase = basis ["requestHeader", 118 val serverBase = basis ["requestHeader",
160 ("strsuffix", "suf"), 162 ("strsuffix", "suf"),
161 ("strlen", "slen"), 163 ("strlen", "slen"),
162 ("strindex", "sidx"), 164 ("strindex", "sidx"),
163 ("strchr", "schr"), 165 ("strchr", "schr"),
164 ("substring", "ssub"), 166 ("substring", "ssub"),
165 ("strcspn", "sspn")] 167 ("strcspn", "sspn"),
168 ("kc", "kc")]
166 val jsFuncs = ref jsFuncsBase 169 val jsFuncs = ref jsFuncsBase
167 fun setJsFuncs ls = jsFuncs := foldl (fn ((k, v), m) => M.insert (m, k, v)) jsFuncsBase ls 170 fun setJsFuncs ls = jsFuncs := foldl (fn ((k, v), m) => M.insert (m, k, v)) jsFuncsBase ls
168 fun jsFunc x = M.find (!jsFuncs, x) 171 fun jsFunc x = M.find (!jsFuncs, x)
169 172
170 datatype pattern_kind = Exact | Prefix 173 datatype pattern_kind = Exact | Prefix