diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-04-09 16:36:50 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-04-09 16:36:50 -0400 |
commit | 17cb59d373d1a94731d3730b938776b524d9f81c (patch) | |
tree | 3942a2b3cfdab76d585ffaea82462831d241d351 /src/mono_opt.sml | |
parent | f48c39b31e2d82b1ef7da1aae7d0c555d26d3101 (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) = |