-
-
Notifications
You must be signed in to change notification settings - Fork 369
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate a FileTarget for each possible target location
If a target file has multiple possible locations, then we assume they are all separate file targets. This happens with '.hs-boot' files if they are in the root directory of the project. GHC reports options such as '-i. A' as 'TargetFile A.hs' instead of 'TargetModule A'. In 'fromTargetId', we dutifully look for '.hs-boot' files and add them to the targetLocations of the TargetDetails. Then we add everything to the 'knownTargetsVar'. However, when we look for a 'Foo.hs-boot' file in 'FindImports.hs', we look for either * TargetFile Foo.hs-boot * TargetModule Foo If we don't generate a TargetFile for each potential location, we will only have 'TargetFile Foo.hs' in the 'knownTargetsVar', thus not find 'TargetFile Foo.hs-boot' and also not find 'TargetModule Foo'.
- Loading branch information
Showing
1 changed file
with
32 additions
and
15 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