| `Exn e -> raise e
;;
+let get_checked_decl = function
+ | NReference.Ref (uri, NReference.Decl) ->
+ (match get_checked_obj uri with
+ | _,height,_,_, NCic.Constant (rlv,name,None,ty,att) ->
+ rlv,name,ty,att,height
+ | _,_,_,_, NCic.Constant (_,_,Some _,_,_) ->
+ prerr_endline "get_checked_decl on a definition"; assert false
+ | _ -> prerr_endline "get_checked_decl on a non decl 2"; assert false)
+ | _ -> prerr_endline "get_checked_decl on a non decl"; assert false
+;;
+
let get_checked_def = function
| NReference.Ref (uri, NReference.Def _) ->
(match get_checked_obj uri with
| _ -> prerr_endline "get_indty_leftno called on a non indty";assert false
;;
+let get_relevance (NReference.Ref (_, infos) as r) =
+ match infos with
+ NReference.Def _ -> let res,_,_,_,_,_ = get_checked_def r in res
+ | NReference.Decl -> let res,_,_,_,_ = get_checked_decl r in res
+ | NReference.Ind _ ->
+ let _,_,tl,_,n = get_checked_indtys r in
+ let res,_,_,_ = List.nth tl n in
+ res
+ | NReference.Con (_,i) ->
+ let _,_,tl,_,n = get_checked_indtys r in
+ let _,_,_,cl = List.nth tl n in
+ let res,_,_ = List.nth cl (i - 1) in
+ res
+ | NReference.Fix (fixno,_,_)
+ | NReference.CoFix fixno ->
+ let fl,_,_ = get_checked_fixes_or_cofixes r in
+ let res,_,_,_,_ = List.nth fl fixno in
+ res
+;;
+
+
let invalidate _ =
assert (!frozen_list = []);
NUri.UriHash.clear cache