Coding style: Using StandaloneKindSignatures in GHC

Chris Smith cdsmith at
Fri May 21 16:37:51 UTC 2021

On Fri, May 21, 2021 at 2:11 AM Baldur Blöndal <baldurpet at> wrote:

> > encouraging the use of a standalone signature for type declarations
> where at least one parameter of the datatype does not have kind Type.
> So Dict, Eq both get a sig but Fix and Either do not?
>   type Dict :: Constraint -> Type
>   type Eq   :: Type -> Constraint
>   type Fix  :: (Type -> Type) -> Type

 That's not how I understand Richard's criteria.  Dict and Fix have
non-Type parameters (Dict has a Constraint parameter, and Fix has a (Type
-> Type) parameter.  On the other hand, Eq and Either have only Types as
parameters.  This seems to match my intuition about when a kind signature
might be helpful, as well as yours as far as I can tell from what you wrote.

That's not to say I am advocating any kind of rule.  As I'm not really
involved in GHC development, I refrain from having any opinion.  I just
think you may have misread Richard's suggestion.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ghc-devs mailing list