aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Interface/Create.hs
diff options
context:
space:
mode:
authorMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-12-12 06:22:31 +0000
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-12-12 06:22:31 +0000
commite1156b56e4711546956f5588b7b4258cb42caaac (patch)
treea203335acfb5e53087001f054c3a5a345635585c /haddock-api/src/Haddock/Interface/Create.hs
parentd867ff18c6d23d792d070b17cc76cba35f69c649 (diff)
Revert "Merge branch 'reverts'"
This reverts commit 5c93cc347773c7634321edd5f808d5b55b46301f, reversing changes made to 5b81a9e53894d2ae591ca0c6c96199632d39eb06. Conflicts: haddock-api/src/Haddock/Convert.hs
Diffstat (limited to 'haddock-api/src/Haddock/Interface/Create.hs')
-rw-r--r--haddock-api/src/Haddock/Interface/Create.hs16
1 files changed, 7 insertions, 9 deletions
diff --git a/haddock-api/src/Haddock/Interface/Create.hs b/haddock-api/src/Haddock/Interface/Create.hs
index 2ed25542..11b8494d 100644
--- a/haddock-api/src/Haddock/Interface/Create.hs
+++ b/haddock-api/src/Haddock/Interface/Create.hs
@@ -157,7 +157,7 @@ mkAliasMap dflags mRenamedSource =
alias <- ideclAs impDecl
return $
(lookupModuleDyn dflags
- (fmap Module.fsToPackageId $
+ (fmap Module.fsToPackageKey $
ideclPkgQual impDecl)
(case ideclName impDecl of SrcLoc.L _ name -> name),
alias))
@@ -165,15 +165,13 @@ mkAliasMap dflags mRenamedSource =
-- similar to GHC.lookupModule
lookupModuleDyn ::
- DynFlags -> Maybe PackageId -> ModuleName -> Module
+ DynFlags -> Maybe PackageKey -> ModuleName -> Module
lookupModuleDyn _ (Just pkgId) mdlName =
Module.mkModule pkgId mdlName
lookupModuleDyn dflags Nothing mdlName =
- flip Module.mkModule mdlName $
- case filter snd $
- Packages.lookupModuleInAllPackages dflags mdlName of
- (pkgId,_):_ -> Packages.packageConfigId pkgId
- [] -> Module.mainPackageId
+ case Packages.lookupModuleInAllPackages dflags mdlName of
+ (m,_):_ -> m
+ [] -> Module.mkModule Module.mainPackageKey mdlName
-------------------------------------------------------------------------------
@@ -697,8 +695,8 @@ moduleExports thisMod expMod dflags warnings gre _exports decls ifaceMap instIfa
"documentation for exported module: " ++ pretty dflags expMod]
return []
where
- m = mkModule packageId expMod
- packageId = modulePackageId thisMod
+ m = mkModule packageKey expMod
+ packageKey = modulePackageKey thisMod
-- Note [1]: