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