]> matita.cs.unibo.it Git - helm.git/commitdiff
Added a new function in_cache to cicEnvironemt. It takes an uri
authorAndrea Asperti <andrea.asperti@unibo.it>
Mon, 5 Apr 2004 13:58:54 +0000 (13:58 +0000)
committerAndrea Asperti <andrea.asperti@unibo.it>
Mon, 5 Apr 2004 13:58:54 +0000 (13:58 +0000)
and returns true or false according to the fact that uri is or
is not in the cache

helm/ocaml/cic_proof_checking/cicEnvironment.ml
helm/ocaml/cic_proof_checking/cicEnvironment.mli

index 45c0dba5a8b404fbe2201e8e9a0ff24b638340c4..8014a19404d99da98716962b039b203ef559e97d 100644 (file)
@@ -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
+;;
index 99244f47f7c25e2bef0efe258507c9e5b49b81c0..615cdf9be37675fbab987ce27bb3257dcba8221f 100644 (file)
@@ -83,3 +83,6 @@ val dump_to_channel : ?callback:(string -> unit) -> out_channel -> unit
 val restore_from_channel : ?callback:(string -> unit) -> in_channel -> unit
 val empty : unit -> unit
 
+(* for filtering in tacticChaser *)
+(* NEW *)
+val in_cache : UriManager.uri -> bool