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
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix source spans for multi-clause definitions (#318)
* Fix source spans for multi-clause definitions Currently, we use the source span of the match which corresponds to the whole clause instead of just the function identifier. This resulted in us pointing every goto definition request within a clause to the function if there is no other information (either because it failed because it came from an external package or simply because you are not on an identifier). This PR fixes this by getting the proper source spans frmo the HsMatchContext. Somewhat annoyingly, we have to get it from the parsed module since GHC messes this up during typechecking but it’s reasonably simple.
- Loading branch information
1 parent
eb96e2c
commit 4f61cb6
Showing
3 changed files
with
30 additions
and
7 deletions.
There are no files selected for viewing
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
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
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