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
let _,tl2 = HExtlib.split_nth (fail+1) tl2 in
try
HExtlib.list_forall_default3
let _,tl2 = HExtlib.split_nth (fail+1) tl2 in
try
HExtlib.list_forall_default3
tl1 tl2 true relevance
with Invalid_argument _ -> false
else false)
| (C.Appl (hd1::tl1), C.Appl (hd2::tl2)) ->
aux test_eq_only context hd1 hd2 &&
tl1 tl2 true relevance
with Invalid_argument _ -> false
else false)
| (C.Appl (hd1::tl1), C.Appl (hd2::tl2)) ->
aux test_eq_only context hd1 hd2 &&
R.reduce ~delta ~subst context m1,
R.reduce ~delta ~subst context m2
in
R.reduce ~delta ~subst context m1,
R.reduce ~delta ~subst context m2
in
((k1,e1,t1,s1),norm1 as m1),((k2,e2,t2,s2), norm2 as m2)
=
(alpha_eq test_eq_only
((k1,e1,t1,s1),norm1 as m1),((k2,e2,t2,s2), norm2 as m2)
=
(alpha_eq test_eq_only
- convert_machines (put_in_whd (0,[],t1,[]) (0,[],t2,[]))
+ convert_machines test_eq_only (put_in_whd (0,[],t1,[]) (0,[],t2,[]))