aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2014-11-03 19:31:43 +0100
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2014-12-02 22:39:22 +0100
commite2fa65fccb9d55ea0b6bd5873155abf436785b1f (patch)
tree92f016008068f618703362818a4b4428729c968b /pretyping
parent6fd7634319e7a82e89667d3fc70ecbd65e7bf45c (diff)
When solving ?id{args} = ?id'{args'}, give preference to ?id:=?id' if
possible, which is the "natural" way to orient an equation. At least it matters for matching subterms against patterns, so that it is the pattern variables which are substituted if ever the subterm has itself existential variables, as in: Goal exists x, S x = x. eexists. destruct (S _).
Diffstat (limited to 'pretyping')
-rw-r--r--pretyping/evarsolve.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/pretyping/evarsolve.ml b/pretyping/evarsolve.ml
index e73a5d257..328bc3bdd 100644
--- a/pretyping/evarsolve.ml
+++ b/pretyping/evarsolve.ml
@@ -1119,10 +1119,10 @@ let opp_problem = function None -> None | Some b -> Some (not b)
let solve_evar_evar_aux f g env evd pbty (evk1,args1 as ev1) (evk2,args2 as ev2) =
let aliases = make_alias_map env in
- try solve_evar_evar_l2r f g env evd aliases pbty ev1 ev2
- with CannotProject filter1 ->
try solve_evar_evar_l2r f g env evd aliases (opp_problem pbty) ev2 ev1
with CannotProject filter2 ->
+ try solve_evar_evar_l2r f g env evd aliases pbty ev1 ev2
+ with CannotProject filter1 ->
postpone_evar_evar f env evd pbty filter1 ev1 filter2 ev2
let solve_evar_evar ?(force=false) f g env evd pbty (evk1,args1 as ev1) (evk2,args2 as ev2) =