@@ -27,7 +27,6 @@ module Development.IDE.Core.Compile
27
27
, loadHieFile
28
28
, loadInterface
29
29
, loadModulesHome
30
- , setupFinderCache
31
30
, getDocsBatch
32
31
, lookupName
33
32
,mergeEnvs ) where
@@ -654,30 +653,6 @@ handleGenerationErrors' dflags source action =
654
653
. ((" Error during " ++ T. unpack source) ++ ) . show @ SomeException
655
654
]
656
655
657
- -- | Initialise the finder cache, dependencies should be topologically
658
- -- sorted.
659
- setupFinderCache :: [ModSummary ] -> HscEnv -> IO HscEnv
660
- setupFinderCache mss session = do
661
-
662
- -- Make modules available for others that import them,
663
- -- by putting them in the finder cache.
664
- let ims = map (installedModule (homeUnitId_ $ hsc_dflags session) . moduleName . ms_mod) mss
665
- ifrs = zipWith (\ ms -> InstalledFound (ms_location ms)) mss ims
666
- -- set the target and module graph in the session
667
- graph = mkModuleGraph mss
668
-
669
- -- We have to create a new IORef here instead of modifying the existing IORef as
670
- -- it is shared between concurrent compilations.
671
- prevFinderCache <- readIORef $ hsc_FC session
672
- let newFinderCache =
673
- foldl'
674
- (\ fc (im, ifr) -> GHC. extendInstalledModuleEnv fc im ifr) prevFinderCache
675
- $ zip ims ifrs
676
- newFinderCacheVar <- newIORef $! newFinderCache
677
-
678
- pure $ session { hsc_FC = newFinderCacheVar, hsc_mod_graph = graph }
679
-
680
-
681
656
-- | Load modules, quickly. Input doesn't need to be desugared.
682
657
-- A module must be loaded before dependent modules can be typechecked.
683
658
-- This variant of loadModuleHome will *never* cause recompilation, it just
0 commit comments