From 9b403b0f5f565674adce6c64b6942d36c3d6f7ec Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Wed, 18 Nov 2020 13:54:03 +0100 Subject: DynFlags's unit fields moved to HscEnv --- haddock-api/src/Haddock/Interface/Create.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'haddock-api/src/Haddock/Interface') diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs index 8bc8d306..7ef64a94 100644 --- a/haddock-api/src/Haddock/Interface/Create.hs +++ b/haddock-api/src/Haddock/Interface/Create.hs @@ -47,6 +47,7 @@ import GHC.Types.SourceFile import GHC.Core.ConLike (ConLike(..)) import GHC import GHC.Driver.Ppr +import GHC.Driver.Env import GHC.Types.Name import GHC.Types.Name.Set import GHC.Types.Name.Env @@ -67,11 +68,12 @@ import GHC.Unit.Module.Warnings -- To do this, we need access to already processed modules in the topological -- sort. That's what's in the 'IfaceMap'. createInterface :: TypecheckedModule + -> UnitState -> [Flag] -- Boolean flags -> IfaceMap -- Locally processed modules -> InstIfaceMap -- External, already installed interfaces -> ErrMsgGhc Interface -createInterface tm flags modMap instIfaceMap = do +createInterface tm unit_state flags modMap instIfaceMap = do let ms = pm_mod_summary . tm_parsed_module $ tm mi = moduleInfo tm @@ -84,7 +86,7 @@ createInterface tm flags modMap instIfaceMap = do !instances = modInfoInstances mi !fam_instances = md_fam_insts md !exportedNames = modInfoExportsWithSelectors mi - (pkgNameFS, _) = modulePackageInfo dflags flags (Just mdl) + (pkgNameFS, _) = modulePackageInfo unit_state flags (Just mdl) pkgName = fmap (unpackFS . (\(PackageName n) -> n)) pkgNameFS (TcGblEnv { tcg_rdr_env = gre @@ -164,8 +166,7 @@ createInterface tm flags modMap instIfaceMap = do | otherwise = exportItems !prunedExportItems = seqList prunedExportItems' `seq` prunedExportItems' - let !aliases = - mkAliasMap (unitState dflags) $ tm_renamed_source tm + let !aliases = mkAliasMap unit_state $ tm_renamed_source tm modWarn <- liftErrMsg (moduleWarning dflags gre warnings) -- cgit v1.2.3