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

Give asum, msum, and Product instances explicit kind signatures #611

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

RyanGlScott
Copy link
Collaborator

This adds more explicit Type -> Type kind signatures to definitions that would otherwise be kind-generalized to have overly polymorphic kinds:

  • The kinds of Asum and Msum (the promoted counterparts to the term-level asum and msum functions, respectively).
  • The helper type families generated when promoting the Alternative and MonadPlus instances for Data.Functor.Product. This sort of kind polymorphism isn't observable by users in today's GHC, but it will cause problems later in a future version of GHC that implements GHC#23515. (See Make singletons buildable after GHC#23515 #601.)

(I should have added these as part of #606 or #607, but I forgot them due to an oversight.)

This adds more explicit `Type -> Type` kind signatures to definitions that
would otherwise be kind-generalized to have overly polymorphic kinds:

* The kinds of `Asum` and `Msum` (the promoted counterparts to the term-level
  `asum` and `msum` functions, respectively).
* The helper type families generated when promoting the `Alternative` and
  `MonadPlus` instances for `Data.Functor.Product`. This sort of kind
  polymorphism isn't observable by users in today's GHC, but it will cause
  problems later in a future version of GHC that implements
  [GHC#23515](https://gitlab.haskell.org/ghc/ghc/-/issues/23515). (See #601.)

(I should have added these as part of #606 or #607, but I forgot them due to an
oversight.)
@RyanGlScott RyanGlScott merged commit ae2a94f into master Jul 1, 2024
24 checks passed
@RyanGlScott RyanGlScott deleted the T601-even-less-polymorphism branch July 1, 2024 22:53
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.

1 participant