-let check_rel1_irrelevant ~metasenv ~subst context = fun _ -> ();;
-(* let shift e (k, context) = k+1,e::context in
- let rec aux (evil, context as k) () t =
- match R.whd ~subst context t with
- | C.Rel i when i = evil -> (*
- raise (TypeCheckerFailure (lazy (Printf.sprintf
- "Argument %s declared as irrelevante is used in a relevant position"
- (PP.ppterm ~subst ~metasenv ~context (C.Rel i))))) *) ()
- | C.Meta _ -> ()
- | C.Lambda (name,so,tgt) ->
- (* checking so is not needed since the implicit version of CC
- * has untyped lambdas (curry style), see Barras and Bernardo *)
- aux (shift (name,C.Decl so) k) () tgt
- | C.Appl (C.Const ref::args) ->
- let relevance = NCicEnvironment.get_relevance ref in
- HExtlib.list_iter_default2
- (fun t -> function false -> () | _ -> aux k () t)
- args true relevance
- | C.Match (_, _, _, []) -> ()
- | C.Match (ref, _, t, [p]) ->
- aux k () p;
- let _,lno,itl,_,_ = E.get_checked_indtys ref in
- let _,_,_,cl = List.hd itl in
- let _,_,c = List.hd cl in
- if not (is_non_informative lno c) then aux k () t
- | C.Match (_, _, t, pl) -> List.iter (aux k ()) (t::pl)
- | t -> U.fold shift k aux () t
- in
- aux (1, context) () *)