summaryrefslogtreecommitdiff
path: root/src/mono_opt.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-02 13:37:52 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-02 13:37:52 -0400
commit20d3fa9974879189544b752e43842a67c1fec0b9 (patch)
treeadeed19de731e8e7988336ace88397b1e309e468 /src/mono_opt.sml
parent3417bfbe670bd15796dd0fa8ca97209acfedfffb (diff)
allow/deny working in Mono_opt
Diffstat (limited to 'src/mono_opt.sml')
-rw-r--r--src/mono_opt.sml11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mono_opt.sml b/src/mono_opt.sml
index 41724eb0..fefe24e1 100644
--- a/src/mono_opt.sml
+++ b/src/mono_opt.sml
@@ -30,9 +30,6 @@ structure MonoOpt :> MONO_OPT = struct
open Mono
structure U = MonoUtil
-val bless = ref (fn _ : string => true)
-val blessMime = ref (CharVector.all (fn ch => Char.isAlphaNum ch orelse ch = #"-" orelse ch = #"/" orelse ch = #"."))
-
fun typ t = t
fun decl d = d
@@ -382,16 +379,16 @@ fun exp e =
| EJavaScript (_, _, SOME (e, _)) => e
| EFfiApp ("Basis", "bless", [(se as EPrim (Prim.String s), loc)]) =>
- (if !bless s then
+ (if Settings.checkUrl s then
()
else
- ErrorMsg.errorAt loc "Invalid URL passed to 'bless'";
+ ErrorMsg.errorAt loc ("Invalid URL " ^ s ^ " passed to 'bless'");
se)
| EFfiApp ("Basis", "blessMime", [(se as EPrim (Prim.String s), loc)]) =>
- (if !blessMime s then
+ (if Settings.checkMime s then
()
else
- ErrorMsg.errorAt loc "Invalid string passed to 'blessMime'";
+ ErrorMsg.errorAt loc ("Invalid string " ^ s ^ " passed to 'blessMime'");
se)
| EFfiApp ("Basis", "checkString", [(EPrim (Prim.String s), loc)]) =>