]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitaScript.ml
andrea.ma removed (superseded by match.ma)
[helm.git] / helm / matita / matitaScript.ml
index f9855348a0d0ff9b6a4cc8224fd303aa527936e3..26a0f2487503af6530841f54bc9b3c8cc0c35274 100644 (file)
  *)
 
 open Printf
-
 open MatitaTypes
 
+let debug = true
+let debug_print = if  debug then prerr_endline else ignore
+
   (** raised when one of the script margins (top or bottom) is reached *)
 exception Margin
 
@@ -91,8 +93,13 @@ let eval_with_engine status user_goal parsed_text st =
     let module UM = UriManager in
     DTE.fold (
       fun k ((v,_) as value) acc -> 
-        let v = UM.strip_xpointer (UM.uri_of_string v) in
-        if List.exists (fun (s,_) -> s = v) new_status.objects then
+        let b = 
+          try
+            let v = UM.strip_xpointer (UM.uri_of_string v) in
+            List.exists (fun (s,_) -> s = v) new_status.objects 
+          with UM.IllFormedUri _ -> false
+        in
+        if b then 
           acc
         else
           DTE.add k value acc