comparison src/settings.sml @ 1556:e1f5d9c4cc20

An abstract type of IDs
author Adam Chlipala <adam@chlipala.net>
date Sat, 03 Sep 2011 12:51:05 -0400
parents d5c961c709f9
children df6a7a22760a
comparison
equal deleted inserted replaced
1555:d5c961c709f9 1556:e1f5d9c4cc20
153 "onDblclick", 153 "onDblclick",
154 "onKeydown", 154 "onKeydown",
155 "onKeypress", 155 "onKeypress",
156 "onKeyup", 156 "onKeyup",
157 "onMousedown", 157 "onMousedown",
158 "onMouseup"] 158 "onMouseup",
159 "fresh"]
159 160
160 val benign = ref benignBase 161 val benign = ref benignBase
161 fun setBenignEffectful ls = benign := S.addList (benignBase, ls) 162 fun setBenignEffectful ls = benign := S.addList (benignBase, ls)
162 fun isBenignEffectful x = S.member (!benign, x) 163 fun isBenignEffectful x = S.member (!benign, x)
163 164
276 ("onDblclick", "uw_onDblclick"), 277 ("onDblclick", "uw_onDblclick"),
277 ("onKeydown", "uw_onKeydown"), 278 ("onKeydown", "uw_onKeydown"),
278 ("onKeypress", "uw_onKeypress"), 279 ("onKeypress", "uw_onKeypress"),
279 ("onKeyup", "uw_onKeyup"), 280 ("onKeyup", "uw_onKeyup"),
280 ("onMousedown", "uw_onMousedown"), 281 ("onMousedown", "uw_onMousedown"),
281 ("onMouseup", "uw_onMouseup")] 282 ("onMouseup", "uw_onMouseup"),
283
284 ("fresh", "fresh")]
282 val jsFuncs = ref jsFuncsBase 285 val jsFuncs = ref jsFuncsBase
283 fun setJsFuncs ls = jsFuncs := foldl (fn ((k, v), m) => M.insert (m, k, v)) jsFuncsBase ls 286 fun setJsFuncs ls = jsFuncs := foldl (fn ((k, v), m) => M.insert (m, k, v)) jsFuncsBase ls
284 fun jsFunc x = M.find (!jsFuncs, x) 287 fun jsFunc x = M.find (!jsFuncs, x)
285 fun allJsFuncs () = M.listItemsi (!jsFuncs) 288 fun allJsFuncs () = M.listItemsi (!jsFuncs)
286 289