Coding style: Using StandaloneKindSignatures in GHC
Chris Smith
cdsmith at gmail.com
Fri May 21 16:37:51 UTC 2021
On Fri, May 21, 2021 at 2:11 AM Baldur Blöndal <baldurpet at gmail.com> 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: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20210521/bbcf6e0b/attachment.html>
More information about the ghc-devs
mailing list