Mercurial > urweb
diff src/settings.sml @ 1183:9d3ccb8b39ac
safeGet
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 09 Mar 2010 18:28:44 -0500 |
parents | 7a2a7a8f9cab |
children | 134da5110bf7 |
line wrap: on
line diff
--- a/src/settings.sml Tue Mar 09 17:50:42 2010 -0500 +++ b/src/settings.sml Tue Mar 09 18:28:44 2010 -0500 @@ -452,4 +452,13 @@ fun setSigFile v = sigFile := v fun getSigFile () = !sigFile +structure SS = BinarySetFn(struct + type ord_key = string + val compare = String.compare + end) + +val safeGet = ref SS.empty +fun setSafeGets ls = safeGet := SS.addList (SS.empty, ls) +fun isSafeGet x = SS.member (!safeGet, x) + end