diff options
author | Edward Z. Yang <ezyang@cs.stanford.edu> | 2017-03-02 16:27:32 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2017-03-02 19:58:01 -0500 |
commit | 0b922909121f6a812d2861a29d0d0d3c7e2fcfce (patch) | |
tree | d971f683eaeb3da2d16025c849637565320940b6 /libraries | |
parent | a6874e546294173c166859769dd8054887a6ded7 (diff) | |
download | haskell-0b922909121f6a812d2861a29d0d0d3c7e2fcfce.tar.gz |
Print out sub-libraries of packages more nicely.
Previously, we would print out the munged package name
which looked like z-bkpcabal01-z-p-0.1.0.0. Now
it looks like: bkpcabal01-0.1.0.0:p.
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>
Test Plan: validate
Reviewers: simonpj, bgamari, austin
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3235
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/ghc-boot/GHC/PackageDb.hs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libraries/ghc-boot/GHC/PackageDb.hs b/libraries/ghc-boot/GHC/PackageDb.hs index 7f8468aada..ecd82dd309 100644 --- a/libraries/ghc-boot/GHC/PackageDb.hs +++ b/libraries/ghc-boot/GHC/PackageDb.hs @@ -98,6 +98,8 @@ data InstalledPackageInfo compid srcpkgid srcpkgname instunitid unitid modulenam sourcePackageId :: srcpkgid, packageName :: srcpkgname, packageVersion :: Version, + mungedPackageName :: Maybe srcpkgname, + libName :: Maybe srcpkgname, abiHash :: String, depends :: [instunitid], -- | Like 'depends', but each dependency is annotated with the @@ -182,6 +184,8 @@ emptyInstalledPackageInfo = sourcePackageId = fromStringRep BS.empty, packageName = fromStringRep BS.empty, packageVersion = Version [] [], + mungedPackageName = Nothing, + libName = Nothing, abiHash = "", depends = [], abiDepends = [], @@ -440,6 +444,7 @@ instance (RepInstalledPackageInfo a b c d e f g) => put (InstalledPackageInfo unitId componentId instantiatedWith sourcePackageId packageName packageVersion + mungedPackageName libName abiHash depends abiDepends importDirs hsLibraries extraLibraries extraGHCiLibraries libraryDirs libraryDynDirs @@ -452,6 +457,8 @@ instance (RepInstalledPackageInfo a b c d e f g) => put (toStringRep sourcePackageId) put (toStringRep packageName) put packageVersion + put (fmap toStringRep mungedPackageName) + put (fmap toStringRep libName) put (toStringRep unitId) put (toStringRep componentId) put (map (\(mod_name, mod) -> (toStringRep mod_name, toDbModule mod)) @@ -484,6 +491,8 @@ instance (RepInstalledPackageInfo a b c d e f g) => sourcePackageId <- get packageName <- get packageVersion <- get + mungedPackageName <- get + libName <- get unitId <- get componentId <- get instantiatedWith <- get @@ -516,6 +525,8 @@ instance (RepInstalledPackageInfo a b c d e f g) => instantiatedWith) (fromStringRep sourcePackageId) (fromStringRep packageName) packageVersion + (fmap fromStringRep mungedPackageName) + (fmap fromStringRep libName) abiHash (map fromStringRep depends) (map (\(k,v) -> (fromStringRep k, v)) abiDepends) |