]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/matitaSync.ml
prima implementazione di demodulate, superposition_left e superposition_right
[helm.git] / helm / matita / matitaSync.ml
index fbcac945ae0a50e9d188e5ada89e2210003c8c65..9a44742b7c5dacebe62d2edd170ccc9020616e61 100644 (file)
@@ -170,21 +170,25 @@ let delta_status status1 status2 =
   in
   diff status1.objects status2.objects
 
+let remove_coercion uri = 
+  CoercDb.remove_coercion (fun (_,_,u) -> UriManager.eq u uri)
+  
 let time_travel ~present ~past =
   let list_of_objs_to_remove = List.rev (delta_status past present) in
     (* List.rev is just for the debugging code, which otherwise may list both
     * something.ind and something.ind#xpointer ... (ask Enrico :-) *)
   let debug_list = ref [] in
-  List.iter (fun (x,p) -> 
-    remove_object_from_disk x p;
+  List.iter (fun (uri,p) -> 
+    remove_object_from_disk uri p;
+    remove_coercion uri;
     (try 
-      CicEnvironment.remove_obj x
+      CicEnvironment.remove_obj uri
     with CicEnvironment.Object_not_found _ -> 
       MatitaLog.debug
         (sprintf "time_travel removes from cache %s that is not in" 
-          (UriManager.string_of_uri x)));
-    let l = MatitaDb.remove_uri x in
-    debug_list := UriManager.string_of_uri x :: !debug_list @ l) 
+          (UriManager.string_of_uri uri)));
+    let l = MatitaDb.remove_uri uri in
+    debug_list := UriManager.string_of_uri uri :: !debug_list @ l) 
   list_of_objs_to_remove;
   
   (* this is debug code