diff src/mono_opt.sml @ 717:e28637743279

URLs
author Adam Chlipala <adamc@hcoop.net>
date Thu, 09 Apr 2009 16:36:50 -0400
parents 0f42461273cf
children 9864b64b1700
line wrap: on
line diff
--- a/src/mono_opt.sml	Thu Apr 09 15:58:36 2009 -0400
+++ b/src/mono_opt.sml	Thu Apr 09 16:36:50 2009 -0400
@@ -30,6 +30,8 @@
 open Mono
 structure U = MonoUtil
 
+val bless = ref (fn _ : string => true)
+
 fun typ t = t
 fun decl d = d
 
@@ -371,6 +373,13 @@
 
       | 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) =