We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
mkHomeModLocation
1 parent 82d1bd7 commit 6024f5aCopy full SHA for 6024f5a
ghcide/src/Development/IDE/Core/Compile.hs
@@ -1122,7 +1122,11 @@ getModSummaryFromImports env fp _modTime mContents = do
1122
liftIO $ evaluate $ rnf textualImports
1123
1124
1125
- modLoc <- liftIO $ mkHomeModLocation dflags mod fp
+ modLoc <- liftIO $ if mod == mAIN_NAME
1126
+ -- specially in tests it's common to have lots of nameless modules
1127
+ -- mkHomeModLocation will map them to the same hi/hie locations
1128
+ then mkHomeModLocation dflags (pathToModuleName fp) fp
1129
+ else mkHomeModLocation dflags mod fp
1130
1131
let modl = mkHomeModule (hscHomeUnit ppEnv) mod
1132
sourceType = if "-boot" `isSuffixOf` takeExtension fp then HsBootFile else HsSrcFile
0 commit comments