[ghc-steering-committee] a plea for PolyKinds

Richard Eisenberg rae at richarde.dev
Thu Dec 3 16:40:28 UTC 2020


Hi all,

I'd like to make a small plea for PolyKinds.

* Haskell is more Haskelly with PolyKinds than without. That is, a key attribute of Haskell is its let-generalization. Yet, oddly, Haskell by default does not generalize its kinds. It should. Here is a motivating example:

> data App f a = App (f a)

With PolyKinds, App gets the kind (k -> Type) -> k -> Type. Without PolyKinds, GHC has to use defaulting to get (Type -> Type) -> Type -> Type, which might not work at certain use sites.

* PolyKinds is backward compatible, except in obscure cases when a PolyKinds module is imported by a NoPolyKinds module.

* Supporting NoPolyKinds is difficult within GHC, and I've been waiting for the right time to propose removing support for it. PolyKinds is conceptually *simpler* than NoPolyKinds, as it doesn't require an awkward defaulting step.

Vote for PolyKinds!

Thanks,
Richard


More information about the ghc-steering-committee mailing list