[Git][ghc/ghc][wip/jeltsch/module-graph-reuse-in-downsweep] Extend and improve the documentation of `downsweep`
Wolfgang Jeltsch pushed to branch wip/jeltsch/module-graph-reuse-in-downsweep at Glasgow Haskell Compiler / GHC Commits: 6dff86a3 by Wolfgang Jeltsch at 2026-05-27T18:14:23+03:00 Extend and improve the documentation of `downsweep` - - - - - 1 changed file: - compiler/GHC/Driver/Downsweep.hs Changes: ===================================== compiler/GHC/Driver/Downsweep.hs ===================================== @@ -162,6 +162,13 @@ moduleGraphNodeMap graph -- cache to avoid recalculating a module summary if the source is -- unchanged. -- +-- Downsweeping can start from scratch for from a given module graph. In the +-- latter case, the given graph is fully included in the resulting graph, even +-- if parts of it are not reachable from any of the given roots. When an import +-- is processed, the source of the imported module is not consulted if this +-- module is already mentioned in the given graph. The sources of the root +-- modules are always consulted, though. +-- -- The returned ModuleGraph has one node for each home-package -- module, plus one for any hs-boot files. The imports of these nodes -- are all there, including the imports of non-home-package modules. @@ -177,7 +184,7 @@ downsweep :: HscEnv -> [ModSummary] -- ^ Old summaries -> Maybe ModuleGraph - -- ^ Existing module graph from which to reuse nodes + -- ^ Optionally a module graph to extend -> [ModuleName] -- Ignore dependencies on these; treat -- them as if they were package modules -> Bool -- True <=> allow multiple targets to have View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6dff86a33610075733fa332c09d748c5... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6dff86a33610075733fa332c09d748c5... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Wolfgang Jeltsch (@jeltsch)