Skip to content

Kinds of type variables, inferred kinds of all types #3099

Open
@Jashweii

Description

@Jashweii

When hovering over types haskell-language-server gives you its kind, but this doesn't work for type variables

import Data.Kind (Type)
data X a = X
f :: forall a b . a -> X b
f v = X

For the term variable v I get v :: a, for the type level X I get forall {k} . k -> Type, but I only get the "defined at ..." for the type variables a and b. Similarly but maybe a separate issue - for uses of polymorphic types I also get the applied, more specific type at the use site, but this doesn't happen for types with polymorphic kinds.

import Data.Kind (Type)
type X :: forall k . k -> Type
data X a = X
f :: (forall (x :: Type) . X x -> b) -> X {- @Type -} () -> b
f h = h {- @() -}

If I hover the use of h (not the pattern binding it) it tells me both h :: forall x. X x -> b and _ :: X () -> b, but if I hover X in X () I only get X :: forall k. k -> Type, no _ :: Type -> Type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    GHCissues with particular GHC versionsstatus: blockedNot actionable, because blocked by upstream/GHC etc.type: enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions