aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock/Interface')
-rw-r--r--src/Haddock/Interface/Create.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index abc65f12..d2115305 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -45,6 +45,7 @@ import Bag
import RdrName
import TcRnTypes
import FastString (concatFS)
+import UniqFM
-- | Use a 'TypecheckedModule' to produce an 'Interface'.
@@ -170,9 +171,9 @@ lookupModuleDyn _ (Just pkgId) mdlName =
Module.mkModule pkgId mdlName
lookupModuleDyn dflags Nothing mdlName =
flip Module.mkModule mdlName $
- case filter snd $
+ case filter Packages.modConfExposed . eltsUFM $
Packages.lookupModuleInAllPackages dflags mdlName of
- (pkgId,_):_ -> Packages.packageConfigId pkgId
+ m:_ -> Packages.packageConfigId (Packages.modConfPkg m)
[] -> Module.mainPackageKey