Skip to content

Commit be60d4d

Browse files
committed
small refactor
1 parent 5f58042 commit be60d4d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ghcide/src/Development/IDE/Core/Rules.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,9 +760,10 @@ ghcSessionDepsDefinition fullModSummary GhcSessionDepsConfig{..} env file = do
760760
depSessions <- map hscEnv <$> uses_ (GhcSessionDeps_ fullModSummary) deps
761761
ifaces <- uses_ GetModIface deps
762762
let inLoadOrder = map (\HiFileResult{..} -> HomeModInfo hirModIface hirModDetails emptyHomeModInfoLinkable) ifaces
763+
de <- useWithSeparateFingerprintRule_ GetModuleGraphTransDepsFingerprints GetModuleGraph file
763764
mg <- do
764765
if fullModuleGraph
765-
then depModuleGraph <$> useWithSeparateFingerprintRule_ GetModuleGraphTransDepsFingerprints GetModuleGraph file
766+
then return $ depModuleGraph de
766767
else do
767768
let mgs = map hsc_mod_graph depSessions
768769
-- On GHC 9.4+, the module graph contains not only ModSummary's but each `ModuleNode` in the graph
@@ -775,7 +776,6 @@ ghcSessionDepsDefinition fullModSummary GhcSessionDepsConfig{..} env file = do
775776
nubOrdOn mkNodeKey (ModuleNode final_deps ms : concatMap mgModSummaries' mgs)
776777
liftIO $ evaluate $ liftRnf rwhnf module_graph_nodes
777778
return $ mkModuleGraph module_graph_nodes
778-
de <- useWithSeparateFingerprintRule_ GetModuleGraphTransDepsFingerprints GetModuleGraph file
779779
session' <- liftIO $ mergeEnvs hsc mg de ms inLoadOrder depSessions
780780

781781
-- Here we avoid a call to to `newHscEnvEqWithImportPaths`, which creates a new

0 commit comments

Comments
 (0)