mirror of
https://github.com/haskell/ghcide.git
synced 2024-12-17 15:11:41 +03:00
Remove NameCache modification in the IDE (#1189)
* Remove NameCache modification * Change the suggested list of replacements
This commit is contained in:
parent
749ee7d699
commit
46c3867409
@ -172,6 +172,7 @@ loadPackage opt packageState us lps p =
|
||||
let mods =
|
||||
[ Module (DefiniteUnitId (DefUnitId p)) mod
|
||||
| (mod, _mbParent) <- exposedMods
|
||||
, False {- HLINT ignore "Short-circuited list comprehension" -}
|
||||
]
|
||||
forM_ mods $ \mod -> GHC.getModuleInfo mod
|
||||
-- this populates the namecache and external package state
|
||||
@ -336,12 +337,13 @@ setupEnv uniqSupply tms lps = do
|
||||
foldl' (\fc (im, ifr) -> GHC.extendInstalledModuleEnv fc im ifr) fc
|
||||
$ zip ims ifrs
|
||||
|
||||
-- construct a new NameCache
|
||||
nc' <- mkNameCache uniqSupply tms lps
|
||||
-- update the name cache
|
||||
liftIO $ modifyIORef (hsc_NC session) $ const nc'
|
||||
-- update the external package state
|
||||
liftIO $ modifyIORef (hsc_EPS session) (updateEps lps)
|
||||
when False $ do
|
||||
-- construct a new NameCache
|
||||
nc' <- mkNameCache uniqSupply tms lps
|
||||
-- update the name cache
|
||||
liftIO $ modifyIORef (hsc_NC session) $ const nc'
|
||||
-- update the external package state
|
||||
liftIO $ modifyIORef (hsc_EPS session) (updateEps lps)
|
||||
-- load dependent modules, which must be in topological order.
|
||||
mapM_ loadModuleHome tms
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user