Description
As reported here, sort annotations for kind Type are only removed in inferred kind signatures, not explicit ones.
The below code
would be inferred to have a kind signature of
data Foo :: forall (k :: Type). k -> Type
data Foo a = Foo
but we want it rendered as
data Foo :: forall k. k -> Type
data Foo a = Foo
since the (k :: Type) is a sort annotation for kind Type.
However, if one declares the kind signature explicitly using that, it will be rendered like that.
-- explicit kind sig declaration with type sort annotation
data Foo :: forall (k :: Type). k -> Type
data Foo a = Foo
-- will get rendered as is without dropping the sort annotation
data Foo :: forall (k :: Type). k -> Type
data Foo a = Foo
Description
As reported here, sort annotations for kind
Typeare only removed in inferred kind signatures, not explicit ones.The below code
would be inferred to have a kind signature of
but we want it rendered as
since the
(k :: Type)is a sort annotation for kindType.However, if one declares the kind signature explicitly using that, it will be rendered like that.