-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Jump to instance definition and explain typeclass evidence #4392
Conversation
0ccc4d3
to
5568ca3
Compare
Just at a high level, am I right that if I have
and I call "go to implementation" on "foo" I will get the option to go to the |
Yes, that's exactly what will happen! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Definitely needs some tests, it's not at all clear to me how it's going to show up.
@@ -307,6 +331,39 @@ atPoint IdeOptions{} (HAR _ hf _ _ (kind :: HieKind hietype)) (DKMap dm km) env | |||
UnhelpfulLoc {} | isInternalName name || isSystemName name -> Nothing | |||
_ -> Just $ "*Defined " <> printOutputable (pprNameDefnLoc name) <> "*" | |||
|
|||
-- We want to render the root constraint even if it is a let, | |||
-- but we don't want to render any subsequent lets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm assuming this makes sense to someone who knows how evidence is represented in GHC...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't quite understand this either, maybe @wz1000 can help us out here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just going to leave this without explanation? I guess so
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added an explanation, feel free to review :)
Can we include a test to see whether this now gives us some kind of useful hover information on overloaded record dot usage? |
dfb7002
to
dacc0b7
Compare
13b79de
to
45fe83f
Compare
@@ -307,6 +331,39 @@ atPoint IdeOptions{} (HAR _ hf _ _ (kind :: HieKind hietype)) (DKMap dm km) env | |||
UnhelpfulLoc {} | isInternalName name || isSystemName name -> Nothing | |||
_ -> Just $ "*Defined " <> printOutputable (pprNameDefnLoc name) <> "*" | |||
|
|||
-- We want to render the root constraint even if it is a let, | |||
-- but we don't want to render any subsequent lets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We just going to leave this without explanation? I guess so
0508cdf
to
37cb2b5
Compare
(I think merge when you're happy, @fendor !) |
37cb2b5
to
7f159e5
Compare
Adds the necessary instances for handling the request type `Method_TextDocumentImplementation`. Further, wire up the appropriate handlers for the "gotoImplementation" request.
827d94d
to
7679ed3
Compare
Also, add extensive note about skipping 'EvLetBinding' evidence nodes.
7679ed3
to
8ce5ec5
Compare
Rebased and slightly modified version of #1983
Still requires some tests and docs.