Hover on inner signature gives confusing information
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.
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.
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.
Tests were moved to hls and there are here:
https://github.com/haskell/haskell-language-server/blob/2e59c60d9f0b2ecaf87fb4551ec6e478e0219330/ghcide/test/exe/Main.hs#L4011-L4012
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
Checking both tests in #2435, i would expect the outer one should be ok and the inner fail
I get no signature:
