This repository has been archived by the owner on Jan 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jacg
force-pushed
the
fix-249-250
branch
2 times, most recently
from
December 17, 2019 16:14
ab15c99
to
2008199
Compare
This fixes hover for types, classes and type variables. Information about spans includes a `Maybe Type` which is `Just` for data-level expressions and `Nothing` for type-level expressions. `AtPoint.atPoint` which is the oddly-named function responsible for constructing hover information, runs in the `Maybe` monad, and aborted at the first sight of a `Nothing`, thus producing no hover information for type-level spans. In the process of fixing this, I have refactored the function to + separate the construction of data-level and type-level hover info + make the components that make up the hover info (and their construction) more clear I can see plenty little improvements that could be made to the functionality of the code (and lots that could be made to its organization), but the most important fixes of the basic missing functionality are here. Fix #248 Fix #250
The name suggests that it returns all locations, while the last commit changed this to return at most one.
There was some confusion about which tests addressed issue 248 vs 249
aherrmann-da
approved these changes
Dec 18, 2019
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.
That's great, thank you for implementing this!
Could you open issues to track the added TODO
comments?
Issues #273 and #274 opened as requested. |
pepeiborra
pushed a commit
to pepeiborra/ide
that referenced
this pull request
Dec 29, 2020
* Fix haskell/ghcide#248 and haskell/ghcide#250 This fixes hover for types, classes and type variables. Information about spans includes a `Maybe Type` which is `Just` for data-level expressions and `Nothing` for type-level expressions. `AtPoint.atPoint` which is the oddly-named function responsible for constructing hover information, runs in the `Maybe` monad, and aborted at the first sight of a `Nothing`, thus producing no hover information for type-level spans. In the process of fixing this, I have refactored the function to + separate the construction of data-level and type-level hover info + make the components that make up the hover info (and their construction) more clear I can see plenty little improvements that could be made to the functionality of the code (and lots that could be made to its organization), but the most important fixes of the basic missing functionality are here. Fix haskell/ghcide#248 Fix haskell/ghcide#250 * Revert behaviour of locationsAtPoint to match its name The name suggests that it returns all locations, while the last commit changed this to return at most one. * Fix issue numbers in test titles There was some confusion about which tests addressed issue 248 vs 249
pepeiborra
pushed a commit
to pepeiborra/ide
that referenced
this pull request
Dec 29, 2020
* Fix haskell/ghcide#248 and haskell/ghcide#250 This fixes hover for types, classes and type variables. Information about spans includes a `Maybe Type` which is `Just` for data-level expressions and `Nothing` for type-level expressions. `AtPoint.atPoint` which is the oddly-named function responsible for constructing hover information, runs in the `Maybe` monad, and aborted at the first sight of a `Nothing`, thus producing no hover information for type-level spans. In the process of fixing this, I have refactored the function to + separate the construction of data-level and type-level hover info + make the components that make up the hover info (and their construction) more clear I can see plenty little improvements that could be made to the functionality of the code (and lots that could be made to its organization), but the most important fixes of the basic missing functionality are here. Fix haskell/ghcide#248 Fix haskell/ghcide#250 * Revert behaviour of locationsAtPoint to match its name The name suggests that it returns all locations, while the last commit changed this to return at most one. * Fix issue numbers in test titles There was some confusion about which tests addressed issue 248 vs 249
pepeiborra
pushed a commit
to pepeiborra/ide
that referenced
this pull request
Dec 29, 2020
* Fix haskell/ghcide#248 and haskell/ghcide#250 This fixes hover for types, classes and type variables. Information about spans includes a `Maybe Type` which is `Just` for data-level expressions and `Nothing` for type-level expressions. `AtPoint.atPoint` which is the oddly-named function responsible for constructing hover information, runs in the `Maybe` monad, and aborted at the first sight of a `Nothing`, thus producing no hover information for type-level spans. In the process of fixing this, I have refactored the function to + separate the construction of data-level and type-level hover info + make the components that make up the hover info (and their construction) more clear I can see plenty little improvements that could be made to the functionality of the code (and lots that could be made to its organization), but the most important fixes of the basic missing functionality are here. Fix haskell/ghcide#248 Fix haskell/ghcide#250 * Revert behaviour of locationsAtPoint to match its name The name suggests that it returns all locations, while the last commit changed this to return at most one. * Fix issue numbers in test titles There was some confusion about which tests addressed issue 248 vs 249
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes hover for types, classes and type variables.
Information about spans includes a
Maybe Type
which isJust
for data-levelexpressions and
Nothing
for type-level expressions.AtPoint.atPoint
which is the oddly-named function responsible for constructinghover information, runs in the
Maybe
monad, and aborted at the first sight ofa
Nothing
, thus producing no hover information for type-level spans.In the process of fixing this, I have refactored the function to
separate the construction of data-level and type-level hover info
make the components that make up the hover info (and their construction) more
clear
I can see plenty little improvements that could be made to the functionality of
the code (and lots that could be made to its organization), but the most
important fixes of the basic missing functionality are here.
Fix #248
Fix #250