- with Invalid_argument _ -> false)
- in res
- (* if res then true
- else
- let relevance = get_relevance_p ~subst context _hd1 tl1 in
- let _,relevance = HExtlib.split_nth !fail relevance in
- let b,relevance = (match relevance with
- | [] -> assert false
- | b::tl -> b,tl) in
- let _,tl1 = HExtlib.split_nth (!fail+1) tl1 in
- let _,tl2 = HExtlib.split_nth (!fail+1) tl2 in
- if (not b) then
- (dance ();
- try
- HExtlib.list_forall_default3
- (fun t1 t2 b -> not b || aux test_eq_only context t1 t2)
- tl1 tl2 true relevance
- with Invalid_argument _ -> false)
- else false *)
- | (C.Appl (hd1::tl1), C.Appl (hd2::tl2)) ->
+ with Invalid_argument _ -> false
+ | HExtlib.FailureAt fail ->
+ let relevance = get_exact_relev ~subst context hd1 tl1 in
+ let _,relevance = HExtlib.split_nth fail relevance in
+ let b,relevance = (match relevance with
+ | [] -> assert false
+ | b::tl -> b,tl) in
+ if (not b) then
+ let _,tl1 = HExtlib.split_nth (fail+1) tl1 in
+ let _,tl2 = HExtlib.split_nth (fail+1) tl2 in
+ try
+ HExtlib.list_forall_default3
+ (fun t1 t2 b -> not b || aux test_eq_only context t1 t2)
+ tl1 tl2 true relevance
+ with Invalid_argument _ -> false
+ else false)
+
+ | (C.Appl (hd1::tl1), C.Appl (hd2::tl2)) ->