diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-11-18 13:54:03 +0100 |
---|---|---|
committer | Sylvain Henry <sylvain@haskus.fr> | 2020-11-30 17:06:04 +0100 |
commit | 9b403b0f5f565674adce6c64b6942d36c3d6f7ec (patch) | |
tree | a22b6bc6059797a5a1c28f758b04bbe76436bc0a /haddock-api/src/Haddock/Interface.hs | |
parent | acf235d607879eb9542127eb0ddb42a250b5b850 (diff) |
DynFlags's unit fields moved 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 |