File tree 2 files changed +7
-1
lines changed
ghcide/src/Development/IDE 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
799
799
#endif
800
800
session' <- liftIO $ mergeEnvs hsc moduleNode inLoadOrder depSessions
801
801
802
- Just <$> liftIO (newHscEnvEqWithImportPaths (envImportPaths env) session' [] )
802
+ Just <$> liftIO (updateHscEnvEq env session')
803
803
804
804
-- | Load a iface from disk, or generate it if there isn't one or it is out of date
805
805
-- 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
4
4
hscEnvWithImportPaths,
5
5
newHscEnvEqPreserveImportPaths,
6
6
newHscEnvEqWithImportPaths,
7
+ updateHscEnvEq,
7
8
envImportPaths,
8
9
envPackageExports,
9
10
envVisibleModuleNames,
@@ -51,6 +52,11 @@ data HscEnvEq = HscEnvEq
51
52
-- If Nothing, 'listVisibleModuleNames' panic
52
53
}
53
54
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
+
54
60
-- | Wrap an 'HscEnv' into an 'HscEnvEq'.
55
61
newHscEnvEq :: FilePath -> HscEnv -> [(UnitId , DynFlags )] -> IO HscEnvEq
56
62
newHscEnvEq cradlePath hscEnv0 deps = do
You can’t perform that action at this time.
0 commit comments