Below is what I originally wrote for the changelog entry:
Previously, data/newtype/type/class declarations that have explicit kind
signatures would not display those kind signatures in their documentation.
For example, the two below types...
data PolyProxy :: forall k. k -> Type
data PolyProxy a = PolyProxy
data TypeProxy :: Type -> Type
data TypeProxy a = TypeProxy
... would only show the following information in their docs. One cannot
be distinguished from another due to the missing kind signatures:
data PolyProxy a = PolyProxy
data TypeProxy a = TypeProxy
Now, these types' kind signatures are displayed above their declarations
in their docs, similar to what one would see in the source code. The only
exception to this are kind signatures whose kinds are "uninteresting"
(covered below).
Moreover, declarations without explicit kind signatures will still
display the kind signatures inferred by the compiler. For example,
Foo's documentation will display the below (commented-out) inferred
kind signature:
{-
data Foo :: (Type -> Type) -> Type -> Type -}
data Foo f a = Foo (f Int) a
However, a kind signature for both explicit and inferred kinds will not
be displayed if that kind is considered "uninteresting." An "uninteresting"
kind is one that follows this form:
Type
Constraint
Type -> K where K refers to an "uninteresting" kind signature
Thus, both the Bar and Baz declarations below will not have their
explicit and inferred kind signatures displayed in their docs.
data Bar :: Type -> Type -> Type
data Bar a b = Bar a b
{-
class Baz :: Type -> Type -> Constraint -}
class Baz a b where
doBaz :: a -> b -> String
Follow up from this comment: https://github.com/purescript/purescript/pull/4119#issuecomment-869022915
Below is what I originally wrote for the changelog entry:
Previously, data/newtype/type/class declarations that have explicit kind signatures would not display those kind signatures in their documentation. For example, the two below types...
... would only show the following information in their docs. One cannot be distinguished from another due to the missing kind signatures:
Now, these types' kind signatures are displayed above their declarations in their docs, similar to what one would see in the source code. The only exception to this are kind signatures whose kinds are "uninteresting" (covered below).
Moreover, declarations without explicit kind signatures will still display the kind signatures inferred by the compiler. For example,
Foo
's documentation will display the below (commented-out) inferred kind signature:However, a kind signature for both explicit and inferred kinds will not be displayed if that kind is considered "uninteresting." An "uninteresting" kind is one that follows this form:
Type
Constraint
Type -> K
whereK
refers to an "uninteresting" kind signatureThus, both the
Bar
andBaz
declarations below will not have their explicit and inferred kind signatures displayed in their docs.