Skip to content

Missing Inferred Type in Tooltip when using Visible Type Applications #4017

Open
@julmb

Description

@julmb

Your environment

Which OS do you use?
ArchLinux

Which version of GHC do you use and how did you install it?
9.6.4 from ghcup

How is your project built (alternative: link to the project)?
cabal

Which LSP client (editor/plugin) do you use?
Code - OSS + vscode-haskell

Which version of HLS do you use and how did you install it?
2.6.0.0 from ghcup

Have you configured HLS in any way (especially: a hie.yaml file)?

"haskell.manageHLS": "PATH",
"haskell.plugin.importLens.codeActionsOn": false,
"haskell.plugin.class.codeActionsOn": false,
"haskell.plugin.semanticTokens.globalOn": true,

Steps to reproduce

Hovering over print in this example:

main = (print :: Int -> IO ()) 0

image

Hovering over print in this example:

main = print @Int 0

image

Expected behaviour

The inferred type for print is shown in the tooltip in both examples.

Actual behaviour

The inferred type for print is only shown with type annotations via ::, but not with visible type applications via @. The inferred type is shown correctly without any type annotations (together with a warning about defaulting the type variable to Integer).

Debug information

I could not find anything relevant in the HLS output log either when typing the expression or when hovering to produce the tooltip.

Metadata

Metadata

Assignees

No one assigned

    Labels

    HackathonThis issue is suitable for hackathon sessionstype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions