diff options
author | Ryan Scott <ryan.gl.scott@gmail.com> | 2022-09-10 20:09:47 -0400 |
---|---|---|
committer | Ryan Scott <ryan.gl.scott@gmail.com> | 2022-09-10 20:10:03 -0400 |
commit | 16de7dc94536ec198be4618eb4f2af6283db00c3 (patch) | |
tree | c6e3b5ea074ad8de507123e660b2e07f177c5995 /.mailmap | |
parent | 9c4ea90c6b493eee6df1798c63a6031cc18ae6da (diff) | |
download | haskell-wip/T22167.tar.gz |
DeriveFunctor: Check for last type variables using dataConUnivTyVarswip/T22167
Previously, derived instances of `Functor` (as well as the related classes
`Foldable`, `Traversable`, and `Generic1`) would determine which constraints to
infer by checking for fields that contain the last type variable. The problem
was that this last type variable was taken from `tyConTyVars`. For GADTs, the
type variables in each data constructor are _not_ the same type variables as
in `tyConTyVars`, leading to #22167.
This fixes the issue by instead checking for the last type variable using
`dataConUnivTyVars`. (This is very similar in spirit to the fix for #21185,
which also replaced an errant use of `tyConTyVars` with type variables from
each data constructor.)
Fixes #22167.
Diffstat (limited to '.mailmap')
0 files changed, 0 insertions, 0 deletions