diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-12-31 13:04:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-31 13:04:19 -0500 |
commit | 9a7e3d6fa3faad2ccb75f7f3e9d9f4bc203a77ca (patch) | |
tree | 270f83c018c26d3708c03d24b87d69a2535dec38 | |
parent | 39a2def15c0d38bb1f7eef6db81676dd13785982 (diff) | |
parent | e7ee7957a7ac746cfa05d7218fe0c2d1fd27f569 (diff) |
Merge pull request #1281 from obsidiansystems/wip/backpack-j
Changes to support -j with backpack
-rw-r--r-- | haddock-api/src/Haddock/Interface.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Interface.hs b/haddock-api/src/Haddock/Interface.hs index e9cd6e0d..81c79cdf 100644 --- a/haddock-api/src/Haddock/Interface.hs +++ b/haddock-api/src/Haddock/Interface.hs @@ -52,6 +52,7 @@ import Text.Printf import GHC.Unit.Module.Env (mkModuleSet, emptyModuleSet, unionModuleSet, ModuleSet) import GHC.Unit.Module.ModSummary +import GHC.Unit.Module.Graph import GHC.Unit.Types import GHC.Data.Graph.Directed import GHC.Driver.Session hiding (verbosity) @@ -137,10 +138,11 @@ createIfaces verbosity modules flags instIfaceMap = do (ifaces, _, !ms) <- foldM f ([], Map.empty, emptyModuleSet) sortedMods return (reverse ifaces, ms) where - f (ifaces, ifaceMap, !ms) modSummary = do + f state (InstantiationNode _) = pure state + f (ifaces, ifaceMap, !ms) (ModuleNode ems) = do x <- {-# SCC processModule #-} withTimingD "processModule" (const ()) $ do - processModule verbosity modSummary flags ifaceMap instIfaceMap + processModule verbosity (emsModSummary ems) flags ifaceMap instIfaceMap return $ case x of Just (iface, ms') -> ( iface:ifaces , Map.insert (ifaceMod iface) iface ifaceMap |