on master help sign in
Remove NameCache modification in the IDE (#1189)

* Remove NameCache modification * Change the suggested list of replacements

commit46c3867409d0285199a6084bb1794e0fc1975b90 authorNeil Mitchell <35463327+neil-da@users.noreply.github.com> dateThu 16 May 2019, 16:01 (7 years ago) parent749ee7d
1 file changed+8−6
src/Development/IDE/Functions/Compile.hs+8−6
src/Development/IDE/Functions/Compile.hs+8−6
@@ -172,6 +172,7 @@ loadPackage opt packageState us lps p =
172172 let mods =
173173 [ Module (DefiniteUnitId (DefUnitId p)) mod
174174 | (mod, _mbParent) <- exposedMods
175+ , False {- HLINT ignore "Short-circuited list comprehension" -}
175176 ]
176177 forM_ mods $ \mod -> GHC.getModuleInfo mod
177178 -- this populates the namecache and external package state
@@ -336,12 +337,13 @@ setupEnv uniqSupply tms lps = do
336337 foldl' (\fc (im, ifr) -> GHC.extendInstalledModuleEnv fc im ifr) fc
337338 $ zip ims ifrs
338339
339− -- construct a new NameCache
340− nc' <- mkNameCache uniqSupply tms lps
341− -- update the name cache
342− liftIO $ modifyIORef (hsc_NC session) $ const nc'
343− -- update the external package state
344− liftIO $ modifyIORef (hsc_EPS session) (updateEps lps)
340+ when False $ do
341+ -- construct a new NameCache
342+ nc' <- mkNameCache uniqSupply tms lps
343+ -- update the name cache
344+ liftIO $ modifyIORef (hsc_NC session) $ const nc'
345+ -- update the external package state
346+ liftIO $ modifyIORef (hsc_EPS session) (updateEps lps)
345347 -- load dependent modules, which must be in topological order.
346348 mapM_ loadModuleHome tms
347349