File tree 1 file changed +7
-1
lines changed
ghcide/src/Development/IDE/Core
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -361,6 +361,7 @@ captureSplicesAndDeps TypecheckHelpers{..} env k = do
361
361
#if MIN_VERSION_ghc(9,3,0)
362
362
-- TODO: support backpack
363
363
nodeKeyToInstalledModule :: NodeKey -> Maybe InstalledModule
364
+ nodeKeyToInstalledModule (NodeKey_Module (ModNodeKeyWithUid (GWIB mod IsBoot ) uid)) = Nothing
364
365
nodeKeyToInstalledModule (NodeKey_Module (ModNodeKeyWithUid (GWIB mod _) uid)) = Just $ mkModule uid mod
365
366
nodeKeyToInstalledModule _ = Nothing
366
367
moduleToNodeKey :: Module -> NodeKey
@@ -1073,11 +1074,16 @@ mergeEnvs env (ms, deps) extraMods envs = do
1073
1074
combineModules a b
1074
1075
| HsSrcFile <- mi_hsc_src (hm_iface a) = a
1075
1076
| otherwise = b
1077
+
1078
+ -- Prefer non-boot files
1079
+ combineModuleLocations a@ (InstalledFound ml m) b | Just fp <- ml_hs_file ml, not (" boot" `isSuffixOf` fp) = a
1080
+ combineModuleLocations _ b = b
1081
+
1076
1082
concatFC :: FinderCacheState -> [FinderCache ] -> IO FinderCache
1077
1083
concatFC cur xs = do
1078
1084
fcModules <- mapM (readIORef . fcModuleCache) xs
1079
1085
fcFiles <- mapM (readIORef . fcFileCache) xs
1080
- fcModules' <- newIORef $! foldl' (plusInstalledModuleEnv const ) cur fcModules
1086
+ fcModules' <- newIORef $! foldl' (plusInstalledModuleEnv combineModuleLocations ) cur fcModules
1081
1087
fcFiles' <- newIORef $! Map. unions fcFiles
1082
1088
pure $ FinderCache fcModules' fcFiles'
1083
1089
You can’t perform that action at this time.
0 commit comments