X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_proof_checking%2FcicEnvironment.ml;h=8014a19404d99da98716962b039b203ef559e97d;hb=c5d5bf37b1e4c4b9b499ed2cbfe27cf2ec181944;hp=3a201ad696b387222cde6a466f62004425e0cc17;hpb=d70688ca1e1bcefc463d3397c6da77b40d055c85;p=helm.git diff --git a/helm/ocaml/cic_proof_checking/cicEnvironment.ml b/helm/ocaml/cic_proof_checking/cicEnvironment.ml index 3a201ad69..8014a1940 100644 --- a/helm/ocaml/cic_proof_checking/cicEnvironment.ml +++ b/helm/ocaml/cic_proof_checking/cicEnvironment.ml @@ -129,7 +129,7 @@ module Cache : in C.Meta(i,l') | C.Sort _ as t -> t - | C.Implicit as t -> t + | C.Implicit _ as t -> t | C.Cast (te,ty) -> C.Cast (restore_in_term te, restore_in_term ty) | C.Prod (n,s,t) -> C.Prod (n, restore_in_term s, restore_in_term t) | C.Lambda (n,s,t) -> C.Lambda (n, restore_in_term s, restore_in_term t) @@ -303,17 +303,17 @@ let find_or_add_unchecked_to_cache uri = Cache.find_or_add_unchecked uri ~get_object_to_add: (function () -> - let filename = Getter.getxml uri in + let filename = Http_getter.getxml' uri in let bodyfilename = match UriManager.bodyuri_of_uri uri with None -> None | Some bodyuri -> try - ignore (Getter.resolve bodyuri) ; + ignore (Http_getter.resolve' bodyuri) ; (* The body exists ==> it is not an axiom *) - Some (Getter.getxml bodyuri) + Some (Http_getter.getxml' bodyuri) with - Getter.Unresolved -> + Http_getter_types.Unresolvable_URI _ -> (* The body does not exist ==> we consider it an axiom *) None in @@ -399,3 +399,9 @@ let put_inductive_definition uri obj = Cic.InductiveDefinition _ -> Cache.add_cooked uri obj | _ -> raise OnlyPutOfInductiveDefinitionsIsAllowed ;; + +let in_cache uri = + try + ignore (Cache.find_cooked uri);true + with Not_found -> false +;;