[ghc-steering-committee] Proposal: Top-level kind signatures (#54)

Roman Leshchinskiy rleshchinskiy at gmail.com
Thu Aug 9 19:45:52 UTC 2018


Hi everyone,

The proposal is about adding stand-alone kind signatures for type
declarations:

  https://github.com/ghc-proposals/ghc-proposals/pull/54

The basic idea is to add support for kind signatures like this:

type T :: Type -> Type -> Type
data T a b = ...

Signatures would be introduced by the keyword 'type' and could be provided
for data types, type synonyms, type families and classes. The extension
would be enable via -XTopLevelKinds.

Additionally, complete user-supplied kind signatures (CUSKs, see
https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html#complete-user-supplied-kind-signatures-and-polymorphic-recursion)
would be given a separate language extension, -XCUSKs which would be on by
default for now but turned off in GHC 8.8 and then deprecated and removed.

The proposal depends on #81.

Feedback has been positive and this is rather cleaner than the current
story so I'm in favour of accepting this.

Like Richard, I'm not really happy with the name "TopLevelKinds",
especially since signatures for associated types aren't even on the top
level. Would something like StandAloneKinds or ExplicitKindSignatures be
better?

One minor point that isn't clear to me: the proposal says that "Associated
types may be given kind signatures within their classes". Are type
variables mentioned in the class head visible in the kind signature for the
associated type?

Thanks,

Roman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-steering-committee/attachments/20180809/f5aabe47/attachment.html>


More information about the ghc-steering-committee mailing list