Coding style: Using StandaloneKindSignatures in GHC
Baldur Blöndal
baldurpet at gmail.com
Fri May 21 06:11:35 UTC 2021
> 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
More information about the ghc-devs
mailing list