let _,_,body,_,_,_ = NCicEnvironment.get_checked_def refer in
aux (0, [], body, s)
| (_, _, C.Const (Ref.Ref (_,
let _,_,body,_,_,_ = NCicEnvironment.get_checked_def refer in
aux (0, [], body, s)
| (_, _, C.Const (Ref.Ref (_,
- (match decofix (fst (reduce ~delta:0 ~subst context (k,e,term,[]))) with
+ let match_head = k,e,term,[] in
+ let reduced,_ = reduce ~delta:0 ~subst context match_head in
+ (match decofix reduced with
| (_, _, C.Const (Ref.Ref (_,Ref.Con (_,j,_))),[]) ->
aux (k, e, List.nth pl (j-1), s)
| (_, _, C.Const (Ref.Ref (_,Ref.Con (_,j,lno))), s')->
let _,params = HExtlib.split_nth lno s' in
aux (k, e, List.nth pl (j-1), params@s)
| (_, _, C.Const (Ref.Ref (_,Ref.Con (_,j,_))),[]) ->
aux (k, e, List.nth pl (j-1), s)
| (_, _, C.Const (Ref.Ref (_,Ref.Con (_,j,lno))), s')->
let _,params = HExtlib.split_nth lno s' in
aux (k, e, List.nth pl (j-1), params@s)
unwind (fst (reduce ~delta ~subst context (0, [], t, [])))
;;
unwind (fst (reduce ~delta ~subst context (0, [], t, [])))
;;
let set_get_relevance f = get_relevance := f;;
(* t1, t2 must be well-typed *)
let set_get_relevance f = get_relevance := f;;
(* t1, t2 must be well-typed *)
with Invalid_argument "List.for_all2" ->
prerr_endline ("Meta " ^ string_of_int n1 ^
" occurrs with local contexts of different lenght\n"^
with Invalid_argument "List.for_all2" ->
prerr_endline ("Meta " ^ string_of_int n1 ^
" occurrs with local contexts of different lenght\n"^
- NCicPp.ppterm ~metasenv:[] ~subst ~context t1 ^ " === " ^
- NCicPp.ppterm ~metasenv:[] ~subst ~context t2);
+ NCicPp.ppterm ~metasenv ~subst ~context t1 ^ " === " ^
+ NCicPp.ppterm ~metasenv ~subst ~context t2);
let _,relevance = HExtlib.split_nth fail relevance in
let b,relevance = (match relevance with
| [] -> assert false
let _,relevance = HExtlib.split_nth fail relevance in
let b,relevance = (match relevance with
| [] -> assert false
| (C.Appl (hd1::tl1), C.Appl (hd2::tl2)) ->
aux test_eq_only context hd1 hd2 &&
| (C.Appl (hd1::tl1), C.Appl (hd2::tl2)) ->
aux test_eq_only context hd1 hd2 &&