-
-
Notifications
You must be signed in to change notification settings - Fork 368
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cabal go to module's definition (#4380)
If you click go-to definition on the field under `exposed-module` or `other-module` it will open the file where this module was defined. The go-to definition function compares the highlighted text with modules in the cabal file. If there is a match, it takes the respective build target and tries to fetch their `hsSourceDirs` from the `PackageDescription`. (by looking at all `buildInfos` with matching names). After finding them, it constructs a path using directory where the cabal file is located, the info from `hsSourceDirs` and a name of the module converted to a path. If the file exists it returns the `Definition` with the acquired location. --------- Co-authored-by: fendor <fendor@users.noreply.github.com> Co-authored-by: Chrizzl <hochrainer.christoph@gmail.com> Co-authored-by: VeryMilkyJoe <jana.chadt@nets.at>
- Loading branch information
1 parent
2253752
commit 9cc8c62
Showing
17 changed files
with
585 additions
and
101 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
Oops, something went wrong.