Mercurial > urweb
comparison src/settings.sml @ 829:20fe00fd81da
Substring functions; fix a nasty MonoReduce pattern match substitution bug
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 30 May 2009 13:29:00 -0400 |
parents | 14a6c0971d89 |
children | 5e1a4b12c83a |
comparison
equal
deleted
inserted
replaced
828:14a6c0971d89 | 829:20fe00fd81da |
---|---|
151 ("attrifyFloat", "ts"), | 151 ("attrifyFloat", "ts"), |
152 ("attrifyBool", "bs"), | 152 ("attrifyBool", "bs"), |
153 ("boolToString", "ts"), | 153 ("boolToString", "ts"), |
154 ("strsub", "sub"), | 154 ("strsub", "sub"), |
155 ("strsuffix", "suf"), | 155 ("strsuffix", "suf"), |
156 ("strlen", "slen")] | 156 ("strlen", "slen"), |
157 ("strindex", "sidx"), | |
158 ("strchr", "schr"), | |
159 ("substring", "ssub")] | |
157 val jsFuncs = ref jsFuncsBase | 160 val jsFuncs = ref jsFuncsBase |
158 fun setJsFuncs ls = jsFuncs := foldl (fn ((k, v), m) => M.insert (m, k, v)) jsFuncsBase ls | 161 fun setJsFuncs ls = jsFuncs := foldl (fn ((k, v), m) => M.insert (m, k, v)) jsFuncsBase ls |
159 fun jsFunc x = M.find (!jsFuncs, x) | 162 fun jsFunc x = M.find (!jsFuncs, x) |
160 | 163 |
161 datatype pattern_kind = Exact | Prefix | 164 datatype pattern_kind = Exact | Prefix |