diff options
author | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2017-05-01 16:58:38 +0200 |
---|---|---|
committer | Hugo Herbelin <Hugo.Herbelin@inria.fr> | 2017-05-01 17:06:39 +0200 |
commit | c3aec655a8a33fff676c79e12888d193cc2e237b (patch) | |
tree | 960f22ca0c2f3f148ecf8cf99aa7333dad9fdcbc /pretyping/patternops.ml | |
parent | 12f1c409daf2cdbd7d0323f0d61723819532b362 (diff) |
Fixing #5487 (v8.5 regression on ltac-matching expressions with evars).
The fix follows an invariant enforced in proofview.ml on the kind of
evars that are goals or that occur in goals.
One day, evar kinds will need a little cleaning...
PS: This is a second attempt, completing db28e82 which was missing the
case PEvar in constr_matching.ml. Indeed the attached fix to #5487
alone made #2602 failing, revealing that the real cause for #2602 was
actually not fixed and that if the test for #2602 was working it was
because of #5487 hiding the real problem in #2602.
Diffstat (limited to 'pretyping/patternops.ml')
-rw-r--r-- | pretyping/patternops.ml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pretyping/patternops.ml b/pretyping/patternops.ml index 2090aad8a..75d3ed30b 100644 --- a/pretyping/patternops.ml +++ b/pretyping/patternops.ml @@ -160,7 +160,9 @@ let pattern_of_constr env sigma t = let ty = Evarutil.nf_evar sigma (existential_type sigma ev) in let () = ignore (pattern_of_constr env ty) in assert (not b); PMeta (Some id) - | Evar_kinds.GoalEvar -> + | Evar_kinds.GoalEvar | Evar_kinds.VarInstance _ -> + (* These are the two evar kinds used for existing goals *) + (* see Proofview.mark_in_evm *) PEvar (evk,Array.map (pattern_of_constr env) ctxt) | _ -> let ty = Evarutil.nf_evar sigma (existential_type sigma ev) in |