@@ -1110,7 +1110,7 @@ mergeEnvs env mg dep_info ms extraMods envs = do
11101110 | HsSrcFile <- mi_hsc_src (hm_iface a) = a
11111111 | otherwise = b
11121112
1113- #elif MIN_VERSION_ghc(9,3,0)
1113+ #else
11141114 let im = Compat. installedModule (toUnitId $ moduleUnit $ ms_mod ms) (moduleName (ms_mod ms))
11151115 ifr = InstalledFound (ms_location ms) im
11161116 curFinderCache = Compat. extendInstalledModuleEnv Compat. emptyInstalledModuleEnv im ifr
@@ -1144,31 +1144,6 @@ mergeEnvs env mg dep_info ms extraMods envs = do
11441144 fcModules' <- newIORef $! foldl' (plusInstalledModuleEnv combineModuleLocations) cur fcModules
11451145 fcFiles' <- newIORef $! Map. unions fcFiles
11461146 pure $ FinderCache fcModules' fcFiles'
1147-
1148- #else
1149- prevFinderCache <- concatFC <$> mapM (readIORef . hsc_FC) envs
1150- let im = Compat. installedModule (toUnitId $ moduleUnit $ ms_mod ms) (moduleName (ms_mod ms))
1151- ifr = InstalledFound (ms_location ms) im
1152- newFinderCache <- newIORef $! Compat. extendInstalledModuleEnv prevFinderCache im ifr
1153- return $! loadModulesHome extraMods $
1154- env{
1155- hsc_HPT = foldMapBy mergeUDFM emptyUDFM hsc_HPT envs,
1156- hsc_FC = newFinderCache,
1157- hsc_mod_graph = mg
1158- }
1159-
1160- where
1161- mergeUDFM = plusUDFM_C combineModules
1162- combineModules a b
1163- | HsSrcFile <- mi_hsc_src (hm_iface a) = a
1164- | otherwise = b
1165- -- required because 'FinderCache':
1166- -- 1) doesn't have a 'Monoid' instance,
1167- -- 2) is abstract and doesn't export constructors
1168- -- To work around this, we coerce to the underlying type
1169- -- To remove this, I plan to upstream the missing Monoid instance
1170- concatFC :: [FinderCache ] -> FinderCache
1171- concatFC = unsafeCoerce (mconcat @ (Map InstalledModule InstalledFindResult ))
11721147#endif
11731148
11741149withBootSuffix :: HscSource -> ModLocation -> ModLocation
0 commit comments