Skip to content

Commit 9295cfb

Browse files
committed
Always use the same mkHomeModLocation for mAIN_NAME
1 parent 3944409 commit 9295cfb

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

ghcide/src/Development/IDE/Core/Compile.hs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1122,11 +1122,7 @@ getModSummaryFromImports env fp _modTime mContents = do
11221122
liftIO $ evaluate $ rnf textualImports
11231123

11241124

1125-
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
1125+
modLoc <- liftIO $ mkHomeModLocation dflags mod fp
11301126

11311127
let modl = mkHomeModule (hscHomeUnit ppEnv) mod
11321128
sourceType = if "-boot" `isSuffixOf` takeExtension fp then HsBootFile else HsSrcFile

0 commit comments

Comments
 (0)