diff options
| author | Georges Gonthier | 2018-11-19 12:07:18 +0100 |
|---|---|---|
| committer | GitHub | 2018-11-19 12:07:18 +0100 |
| commit | b8eff1fceb2cf4466b6904b33410a64158f87bc3 (patch) | |
| tree | 063fbd57d32aa8653848d8018dffd7ec5aae780d /mathcomp/ssreflect/tuple.v | |
| parent | d7eab0e77bbd8c79919a707c5844c5e6c4e4c89b (diff) | |
| parent | 851d7d2dd8d968a00c2c7043ab4c1a7d5c943389 (diff) | |
Merge pull request #242 from anton-trunov/remove-canonical-for-mixins
Document and review the usage of canonical Equality mixins
Diffstat (limited to 'mathcomp/ssreflect/tuple.v')
| -rw-r--r-- | mathcomp/ssreflect/tuple.v | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/mathcomp/ssreflect/tuple.v b/mathcomp/ssreflect/tuple.v index 64585f6..38e3dbe 100644 --- a/mathcomp/ssreflect/tuple.v +++ b/mathcomp/ssreflect/tuple.v @@ -360,7 +360,12 @@ Section UseFinTuple. Variables (n : nat) (T : finType). -Canonical tuple_finMixin := Eval hnf in FinMixin (@FinTuple.enumP n T). +(* tuple_finMixin could, in principle, be made Canonical to allow for folding *) +(* Finite.enum of a finite tuple type (see comments around eqE in eqtype.v), *) +(* but in practice it will not work because the mixin_enum projector *) +(* has been burried under an opaque alias, to avoid some performance issues *) +(* during type inference. *) +Definition tuple_finMixin := Eval hnf in FinMixin (@FinTuple.enumP n T). Canonical tuple_finType := Eval hnf in FinType (n.-tuple T) tuple_finMixin. Canonical tuple_subFinType := Eval hnf in [subFinType of n.-tuple T]. |
