let cache_empty = (Universe.empty,[]);;
let get_candidates (univ,_) ty =
- Universe.get_candidates univ ty
+ if Universe.key ty = ty then
+ Universe.get_candidates univ ty
+ else
+ []
;;
let index (univ,cache) key term =
assert false (* if succed it can't fail *)
;;
let cache_add_success ((univ,_) as cache) cache_key proof =
- Universe.index univ cache_key proof,snd
+ (if Universe.key cache_key = cache_key then
+ Universe.index univ cache_key proof
+ else
+ univ),snd
(match cache_examine cache cache_key with
| Failed_in _ -> cache_replace cache cache_key (Succeded proof)
| UnderInspection -> cache_replace cache cache_key (Succeded proof)