Coding style: Using StandaloneKindSignatures in GHC

Carter Schonwald carter.schonwald at gmail.com
Fri May 21 14:22:49 UTC 2021


Silly question: when will stand alone kind sigs speed up type checking
phase of compilation?

Cause that would be an interesting argument in favor :)

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
>
> It's sensible to exclude tired tropes like `Type` and `Type -> Type`
> but higher-order functors (like Fix) warrant a signature.
>
> Caveat: The kind of type synonyms, type families and data families is
> not necessarily determined by counting the syntactic arguments of X
> like for a `data' declaration as Y could be a type, a functor, a
> bifunctor..
>
>   type X = Y
> _______________________________________________
> ghc-devs mailing list
> ghc-devs at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-devs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20210521/63f8f54f/attachment.html>


More information about the ghc-devs mailing list