File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed
src/Development/IDE/Import Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -131,13 +131,17 @@ locateModule
131131 -> m (Either [FileDiagnostic ] Import )
132132locateModule env comp_info exts targetFor modName mbPkgName isSource = do
133133 case mbPkgName of
134- -- "this" means that we should only look in the current package
135134#if MIN_VERSION_ghc(9,3,0)
136- ThisPkg _ -> do
135+ -- 'ThisPkg' just means some home module, not the current unit
136+ ThisPkg uid
137+ | Just (dirs, reexports) <- lookup uid import_paths
138+ -> lookupLocal uid dirs reexports
139+ | otherwise -> return $ Left $ notFoundErr env modName $ LookupNotFound []
137140#else
141+ -- "this" means that we should only look in the current package
138142 Just " this" -> do
139- #endif
140143 lookupLocal (homeUnitId_ dflags) (importPaths dflags) S. empty
144+ #endif
141145 -- if a package name is given we only go look for a package
142146#if MIN_VERSION_ghc(9,3,0)
143147 OtherPkg uid
Original file line number Diff line number Diff line change @@ -16,4 +16,5 @@ a-1.0.0-inplace
1616-package
1717base
1818-XHaskell98
19+ -XPackageImports
1920B
Original file line number Diff line number Diff line change 11module B (module B ) where
2- import A
2+ import "a" A
33qux = foo
You can’t perform that action at this time.
0 commit comments