downsweep :: HscEnv-> (GhcMessage -> AnyGhcDiagnostic)-> Maybe Messager-> [ModSummary]Old summaries
-> [ModuleName]-> Bool-> IO ([DriverMessages], ModuleGraph)
Downsweep (dependency analysis) for --make mode
Chase downwards from the specified root set, returning summaries for all home modules encountered. Only follow source-import links.
We pass in the previous collection of summaries, which is used as a cache to avoid recalculating a module summary if the source is unchanged.
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.
This function is intendned for use by --make mode and will also insert LinkNodes and InstantiationNodes for any home units.
It will also turn on code generation for any modules that need it by calling
enableCodeGenForTH.