Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Close over kind variables when computing fixed type variables #973

Merged
merged 2 commits into from
Feb 24, 2021

Conversation

RyanGlScott
Copy link
Collaborator

Previously, buildStab would not consider kind variables when determining which type variables need to be fixed in a generated Lens's type signature. This was not a problem in older versions of lens, which aggressively dropped kind variables, but now that lens attempts to include kind variables in generated type signatures, this problem has risen to the surface, resulting in the problems observed in #972.

The solution is to take the set of fixed type variables in buildStab and close over kind variables. For more information, refer to the comments I have left near closeOverKinds.

Fixes #972.

To make the 9.0.1 build work, I've temporarily:

* Relaxed the upper version bounds on `base` for the `cassava` and
  `vector-binary-instances` packages, and
* Made the `hlint` job use GHC 8.10.4, not 9.0.1.
Previously, `buildStab` would not consider kind variables when determining
which type variables need to be fixed in a generated `Lens`'s type signature.
This was not a problem in older versions of `lens`, which aggressively dropped
kind variables, but now that `lens` attempts to include kind variables in
generated type signatures, this problem has risen to the surface, resulting in
the problems observed in #972.

The solution is to take the set of fixed type variables in `buildStab` and
close over kind variables. For more information, refer to the comments I have
left near `closeOverKinds`.

Fixes #972.
@RyanGlScott RyanGlScott merged commit fae336e into master Feb 24, 2021
@RyanGlScott RyanGlScott deleted the T972 branch February 24, 2021 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

makeLenses regression in lens-5
1 participant