Skip to content

Drop Type sort annotations in all kind signatures for docs, not just inferred kind signatures #4160

@JordanMartinez

Description

@JordanMartinez

Description

As reported here, sort annotations for kind Type are only removed in inferred kind signatures, not explicit ones.

The below code

data Foo a = Foo

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions