Skip to content

Commit

Permalink
Compare pattern heads (constants) up to "univs"
Browse files Browse the repository at this point in the history
So that Universe Polymorphic constants are compared "correctly",
i.e. not discriminated by the pattern filtering phase (verbatim
head comparison) but eventually by unification.
  • Loading branch information
Enrico Tassi committed Aug 24, 2015
1 parent e9163a8 commit 14c940b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mathcomp/ssreflect/plugin/v8.5/ssrmatching.ml4
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ let filter_upat i0 f n u fpats =
let na = Array.length u.up_a in
if n < na then fpats else
let np = match u.up_k with
| KpatConst when Term.eq_constr u.up_f f -> na
| KpatFixed when Term.eq_constr u.up_f f -> na
| KpatConst when Term.eq_constr_nounivs u.up_f f -> na
| KpatFixed when Term.eq_constr_nounivs u.up_f f -> na
| KpatEvar k when isEvar_k k f -> na
| KpatLet when isLetIn f -> na
| KpatLam when isLambda f -> na
Expand All @@ -554,8 +554,8 @@ let filter_upat_FO i0 f n u fpats =
let np = nb_args u.up_FO in
if n < np then fpats else
let ok = match u.up_k with
| KpatConst -> Term.eq_constr u.up_f f
| KpatFixed -> Term.eq_constr u.up_f f
| KpatConst -> Term.eq_constr_nounivs u.up_f f
| KpatFixed -> Term.eq_constr_nounivs u.up_f f
| KpatEvar k -> isEvar_k k f
| KpatLet -> isLetIn f
| KpatLam -> isLambda f
Expand Down

0 comments on commit 14c940b

Please sign in to comment.