File tree 3 files changed +9
-4
lines changed
src/Development/IDE/Import
3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -131,13 +131,17 @@ locateModule
131
131
-> m (Either [FileDiagnostic ] Import )
132
132
locateModule env comp_info exts targetFor modName mbPkgName isSource = do
133
133
case mbPkgName of
134
- -- "this" means that we should only look in the current package
135
134
#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 []
137
140
#else
141
+ -- "this" means that we should only look in the current package
138
142
Just " this" -> do
139
- #endif
140
143
lookupLocal (homeUnitId_ dflags) (importPaths dflags) S. empty
144
+ #endif
141
145
-- if a package name is given we only go look for a package
142
146
#if MIN_VERSION_ghc(9,3,0)
143
147
OtherPkg uid
Original file line number Diff line number Diff line change @@ -16,4 +16,5 @@ a-1.0.0-inplace
16
16
-package
17
17
base
18
18
-XHaskell98
19
+ -XPackageImports
19
20
B
Original file line number Diff line number Diff line change 1
1
module B (module B ) where
2
- import A
2
+ import "a" A
3
3
qux = foo
You can’t perform that action at this time.
0 commit comments