diff options
author | 2009-04-09 16:36:50 -0400 | |
---|---|---|
committer | 2009-04-09 16:36:50 -0400 | |
commit | d7306dbac8ca9eecbba9d65379d225b5433b19fc (patch) | |
tree | 3942a2b3cfdab76d585ffaea82462831d241d351 /src/mono_opt.sml | |
parent | c11034fa6703761f48fdb79a92b82027eb5216e5 (diff) |
URLs
Diffstat (limited to 'src/mono_opt.sml')
-rw-r--r-- | src/mono_opt.sml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mono_opt.sml b/src/mono_opt.sml index dfa0420c..205ae3fb 100644 --- a/src/mono_opt.sml +++ b/src/mono_opt.sml @@ -30,6 +30,8 @@ structure MonoOpt :> MONO_OPT = struct open Mono structure U = MonoUtil +val bless = ref (fn _ : string => true) + fun typ t = t fun decl d = d @@ -371,6 +373,13 @@ fun exp e = | EJavaScript (_, _, SOME (e, _)) => e + | EFfiApp ("Basis", "bless", [(se as EPrim (Prim.String s), loc)]) => + (if !bless s then + () + else + ErrorMsg.errorAt loc "Invalid URL passed to 'bless'"; + se) + | EFfiApp ("Basis", "checkString", [(EPrim (Prim.String s), loc)]) => let fun uwify (cs, acc) = |