From 75b9b6ebbe8326f3a2b099ab7f130960b4567618 Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Fri, 27 Mar 2020 17:27:54 +0100 Subject: Renamed UnitInfo fields --- haddock-api/src/Haddock/ModuleTree.hs | 4 ++-- haddock-api/src/Haddock/Options.hs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'haddock-api/src') diff --git a/haddock-api/src/Haddock/ModuleTree.hs b/haddock-api/src/Haddock/ModuleTree.hs index 598e3f9a..de0899fe 100644 --- a/haddock-api/src/Haddock/ModuleTree.hs +++ b/haddock-api/src/Haddock/ModuleTree.hs @@ -17,7 +17,7 @@ import Haddock.Types ( MDoc ) import GHC ( Name ) import GHC.Types.Module ( Module, moduleNameString, moduleName, moduleUnitId, unitIdString ) import GHC.Driver.Session ( DynFlags ) -import GHC.Driver.Packages ( lookupUnit, sourcePackageIdString ) +import GHC.Driver.Packages ( lookupUnit, unitPackageIdString ) import qualified Control.Applicative as A @@ -31,7 +31,7 @@ mkModuleTree dflags showPkgs mods = where modPkg mod_ | showPkgs = Just (unitIdString (moduleUnitId mod_)) | otherwise = Nothing - modSrcPkg mod_ | showPkgs = fmap sourcePackageIdString + modSrcPkg mod_ | showPkgs = fmap unitPackageIdString (lookupUnit dflags (moduleUnitId mod_)) | otherwise = Nothing fn (m,mod_,pkg,srcPkg,short) = addToTrees mod_ m pkg srcPkg short diff --git a/haddock-api/src/Haddock/Options.hs b/haddock-api/src/Haddock/Options.hs index cccca201..0ea1c9e1 100644 --- a/haddock-api/src/Haddock/Options.hs +++ b/haddock-api/src/Haddock/Options.hs @@ -378,8 +378,8 @@ modulePackageInfo :: DynFlags -> (Maybe PackageName, Maybe Data.Version.Version) modulePackageInfo _dflags _flags Nothing = (Nothing, Nothing) modulePackageInfo dflags flags (Just modu) = - ( optPackageName flags <|> fmap packageName pkgDb - , optPackageVersion flags <|> fmap packageVersion pkgDb + ( optPackageName flags <|> fmap unitPackageName pkgDb + , optPackageVersion flags <|> fmap unitPackageVersion pkgDb ) where pkgDb = lookupUnit dflags (moduleUnitId modu) -- cgit v1.2.3