File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed
plugins/default/src/Ide/Plugin/Eval Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -80,6 +80,7 @@ import Development.IDE.Core.RuleTypes (
80
80
GhcSessionDeps (.. ),
81
81
)
82
82
import Development.IDE.GHC.Compat (HscEnv )
83
+ import Development.IDE.GHC.Util (moduleImportPath )
83
84
import DynamicLoading (initializePlugins )
84
85
import GHC (
85
86
ExecOptions (
@@ -369,11 +370,18 @@ runEvalCmd lsp state EvalParams{..} =
369
370
-- Install the module pragmas and options
370
371
df <- liftIO $ setupDynFlagsForGHCiLike env $ ms_hspp_opts ms
371
372
372
- -- Restore the cradle import paths
373
- let impPaths =
374
- fromMaybe (importPaths df) $ envImportPaths session
373
+ -- Desperately looking for an import path
374
+ let impPaths0 = importPaths df
375
+ impPaths1 = envImportPaths session
376
+ impPaths2 = (: [] ) <$> moduleImportPath nfp modName
377
+ impPaths = fromMaybe impPaths0 $ impPaths1 <> impPaths2
378
+ dbg " importPaths0" impPaths0
379
+ dbg " importPaths1" impPaths1
380
+ dbg " importPaths2" impPaths2
375
381
dbg " importPaths" impPaths
382
+ -- Restore the cradle import paths
376
383
df <- return df{importPaths = impPaths}
384
+
377
385
-- Set the modified flags in the session
378
386
_lp <- setSessionDynFlags df
379
387
You can’t perform that action at this time.
0 commit comments