aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/GhcUtils.hs
diff options
context:
space:
mode:
authorMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-08-14 20:23:42 +0100
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-08-14 20:23:42 +0100
commit9f37affe403f19faad0d9874f7d552f094d18af0 (patch)
tree44908301443a76e7c19936d3cb686de07bfcf82e /src/Haddock/GhcUtils.hs
parentc90796ed7a6a625854d28bf55c71eeb36d298c55 (diff)
Revert "Track GHC PackageId to PackageKey renaming."
This reverts commit 8ac42d3327473939c013551750425cac191ff0fd.
Diffstat (limited to 'src/Haddock/GhcUtils.hs')
-rw-r--r--src/Haddock/GhcUtils.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Haddock/GhcUtils.hs b/src/Haddock/GhcUtils.hs
index 33d92131..8ea5485b 100644
--- a/src/Haddock/GhcUtils.hs
+++ b/src/Haddock/GhcUtils.hs
@@ -44,23 +44,23 @@ moduleString = moduleNameString . moduleName
-- return the (name,version) of the package
modulePackageInfo :: Module -> (String, [Char])
-modulePackageInfo modu = case unpackPackageKey pkg of
- Nothing -> (packageKeyString pkg, "")
+modulePackageInfo modu = case unpackPackageId pkg of
+ Nothing -> (packageIdString pkg, "")
Just x -> (display $ pkgName x, showVersion (pkgVersion x))
- where pkg = modulePackageKey modu
+ where pkg = modulePackageId modu
-- This was removed from GHC 6.11
-- XXX we shouldn't be using it, probably
--- | Try and interpret a GHC 'PackageKey' as a cabal 'PackageIdentifer'. Returns @Nothing@ if
+-- | Try and interpret a GHC 'PackageId' as a cabal 'PackageIdentifer'. Returns @Nothing@ if
-- we could not parse it as such an object.
-unpackPackageKey :: PackageKey -> Maybe PackageIdentifier
-unpackPackageKey p
+unpackPackageId :: PackageId -> Maybe PackageIdentifier
+unpackPackageId p
= case [ pid | (pid,"") <- readP_to_S parse str ] of
[] -> Nothing
(pid:_) -> Just pid
- where str = packageKeyString p
+ where str = packageIdString p
lookupLoadedHomeModuleGRE :: GhcMonad m => ModuleName -> m (Maybe GlobalRdrEnv)