X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fmatita%2FmatitaSync.ml;h=9a44742b7c5dacebe62d2edd170ccc9020616e61;hb=9415c1b38c7927adab499ddd75f9a19d650a9acd;hp=fbcac945ae0a50e9d188e5ada89e2210003c8c65;hpb=3b5b254f2faa600a14a837e95f94f953dc9959c7;p=helm.git diff --git a/helm/matita/matitaSync.ml b/helm/matita/matitaSync.ml index fbcac945a..9a44742b7 100644 --- a/helm/matita/matitaSync.ml +++ b/helm/matita/matitaSync.ml @@ -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