diff options
author | Ben Gamari <ben@smart-cactus.org> | 2020-11-30 11:11:37 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-30 11:11:37 -0500 |
commit | 284c9a0c304faf9c186421a62da5d8b4dc73a8a2 (patch) | |
tree | a22b6bc6059797a5a1c28f758b04bbe76436bc0a /haddock-api/src/Haddock/Interface.hs | |
parent | acf235d607879eb9542127eb0ddb42a250b5b850 (diff) | |
parent | 9b403b0f5f565674adce6c64b6942d36c3d6f7ec (diff) |
Merge pull request #1258 from hsyl20/wip/hsyl20/hscenv/unitstate
Unit fields moved from DynFlags to HscEnv
Diffstat (limited to 'haddock-api/src/Haddock/Interface.hs')
-rw-r--r-- | haddock-api/src/Haddock/Interface.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Interface.hs b/haddock-api/src/Haddock/Interface.hs index 583cacf8..be9bd09a 100644 --- a/haddock-api/src/Haddock/Interface.hs +++ b/haddock-api/src/Haddock/Interface.hs @@ -159,10 +159,11 @@ processModule verbosity modsum flags modMap instIfaceMap = do IsBoot -> return Nothing NotBoot -> do + unit_state <- hsc_units <$> getSession out verbosity verbose "Creating interface..." (interface, msgs) <- {-# SCC createIterface #-} withTimingD "createInterface" (const ()) $ do - runWriterGhc $ createInterface tm flags modMap instIfaceMap + runWriterGhc $ createInterface tm unit_state flags modMap instIfaceMap -- We need to keep track of which modules were somehow in scope so that when -- Haddock later looks for instances, it also looks in these modules too. @@ -170,7 +171,7 @@ processModule verbosity modsum flags modMap instIfaceMap = do -- See https://github.com/haskell/haddock/issues/469. hsc_env <- getSession let new_rdr_env = tcg_rdr_env . fst . GHC.tm_internals_ $ tm - home_unit = mkHomeUnitFromFlags (hsc_dflags hsc_env) + home_unit = hsc_home_unit hsc_env !mods = mkModuleSet [ nameModule name | gre <- globalRdrEnvElts new_rdr_env , let name = gre_name gre |