Skip to content
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

Hover on inner signature gives confusing information #767

Open
jacg opened this issue Jan 7, 2020 · 5 comments
Open

Hover on inner signature gives confusing information #767

jacg opened this issue Jan 7, 2020 · 5 comments
Labels

Comments

@jacg
Copy link
Contributor

jacg commented Jan 7, 2020

Hovering on the signature of inner in the following sample, gives the signature of outer. Hovering on the definition of inner gives the correct signature of inner.

outer :: Bool
outer = undefined where

  inner :: Char
  inner = undefined

Tests in haskell/ghcide#311.

@jacg
Copy link
Contributor Author

jacg commented Jan 7, 2020

As discussed in the PR with the tests (#311), hovering on top-level signatures currently does nothing, so for the sake of consistency we should do one of:

  • make hovering on inner signatures also do nothing at all
  • fix the inner signature behaviour to refer to the inner function, but in that case we should make the behaviour on top-level signatures work analogously.

@jacg
Copy link
Contributor Author

jacg commented Jan 9, 2020

In summary, the conclusion we reached in haskell/ghcide#311 is: hover and gotoDef on both inner and top-level signatures should point to the first clasue of their corresponding definitions. The tests merged in haskell/ghcide#311 reflect this decision.

@jneira jneira transferred this issue from haskell/ghcide Dec 31, 2020
@jneira jneira added component: ghcide type: enhancement New feature or request labels Jan 3, 2021
jneira added a commit that referenced this issue Dec 3, 2021
@jneira
Copy link
Member

jneira commented Dec 3, 2021

Tests were moved to hls and there are here:

, test broken broken outL45 outSig "top-level signature #767"
, test broken broken innL48 innSig "inner signature #767"

With hls-1.5.2 i got

outer :: Bool
Defined at D:\ws\haskell\issues\empty\Main.hs:6:1
inner
Defined at D:\ws\haskell\issues\empty\Main.hs:9:3

So it seems to me that outer is right and no broken, as stated by the test

@jneira
Copy link
Member

jneira commented Dec 3, 2021

Checking both tests in #2435, i would expect the outer one should be ok and the inner fail

mergify bot pushed a commit that referenced this issue Dec 4, 2021
* Enable outer/inner hover signature

To check the status of #767

* Change position for top-level signature

And mark as broken inner one
@hasufell
Copy link
Member

I get no signature:
Screenshot_2022-07-13_18-52-53

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants