Skip to content

Hover tooltips should always show inferred types #11317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ChrisEPhifer opened this issue Jan 18, 2022 · 1 comment
Closed

Hover tooltips should always show inferred types #11317

ChrisEPhifer opened this issue Jan 18, 2022 · 1 comment
Labels
A-ide general IDE features A-ty type system / type inference / traits / method resolution C-feature Category: feature request

Comments

@ChrisEPhifer
Copy link

Background / Problem

In the Haskell Language Server (HLS), hovering over any term in a program displays documentation (if available) and the term's inferred type. In the case of polymorphic terms, both the most-general type and the instantiation of the type at the current term is shown. For example, the saturated type of the term optional can be seen at the bottom of the tooltip:

image

In RA, however, there are terms where the only type shown in tooltips is the most-general type; no instantiation of type variables:

image

(There is nothing but the usual "Go to..." links below the examples seen in the screenshot.)

Feature Request

It would be lovely if, like HLS, RA could display fully saturated/instantiated types for every term upon hover. This would improve users' ability to reason locally about polymorphic types used in concrete ways; this is especially helpful for deeply-nested data structures using standard library collections in complex ways (such as the application from which I collected the above screenshot.)

My apologies if I somehow managed to duplicate an issue for this feature! Thank you in advance for your thoughts and effort :)

@Veykril Veykril added A-ide general IDE features A-ty type system / type inference / traits / method resolution C-feature Category: feature request labels Jan 20, 2022
@Veykril
Copy link
Member

Veykril commented Oct 11, 2022

I'll close this issue in favor of #13394 as that has more details and ideas around this improvement. It's definitely something we want to look into.

@Veykril Veykril closed this as completed Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ide general IDE features A-ty type system / type inference / traits / method resolution C-feature Category: feature request
Projects
None yet
Development

No branches or pull requests

2 participants