File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
ghcide/src/Development/IDE Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -799,7 +799,7 @@ ghcSessionDepsDefinition fullModSummary GhcSessionDepsConfig{..} env file = do
799799#endif
800800 session' <- liftIO $ mergeEnvs hsc moduleNode inLoadOrder depSessions
801801
802- Just <$> liftIO (newHscEnvEqWithImportPaths (envImportPaths env) session' [] )
802+ Just <$> liftIO (updateHscEnvEq env session')
803803
804804-- | Load a iface from disk, or generate it if there isn't one or it is out of date
805805-- This rule also ensures that the `.hie` and `.o` (if needed) files are written out.
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ module Development.IDE.Types.HscEnvEq
44 hscEnvWithImportPaths,
55 newHscEnvEqPreserveImportPaths,
66 newHscEnvEqWithImportPaths,
7+ updateHscEnvEq,
78 envImportPaths,
89 envPackageExports,
910 envVisibleModuleNames,
@@ -51,6 +52,11 @@ data HscEnvEq = HscEnvEq
5152 -- If Nothing, 'listVisibleModuleNames' panic
5253 }
5354
55+ updateHscEnvEq :: HscEnvEq -> HscEnv -> IO HscEnvEq
56+ updateHscEnvEq oldHscEnvEq newHscEnv = do
57+ let update newUnique = oldHscEnvEq { envUnique = newUnique, hscEnv = newHscEnv }
58+ update <$> Unique. newUnique
59+
5460-- | Wrap an 'HscEnv' into an 'HscEnvEq'.
5561newHscEnvEq :: FilePath -> HscEnv -> [(UnitId , DynFlags )] -> IO HscEnvEq
5662newHscEnvEq cradlePath hscEnv0 deps = do
You can’t perform that action at this time.
0 commit comments