[commit: ghc] master: Update Cabal submodule, with necessary wibbles. (579bb76)
git at git.haskell.org
git at git.haskell.org
Wed Apr 26 20:04:10 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/579bb7669f40ed01841dd197ee535cf26fa19580/ghc
>---------------------------------------------------------------
commit 579bb7669f40ed01841dd197ee535cf26fa19580
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date: Wed Apr 26 15:26:56 2017 -0400
Update Cabal submodule, with necessary wibbles.
Test Plan: validate
Reviewers: bgamari, austin
Reviewed By: bgamari
Subscribers: rwbarton, thomie
Differential Revision: https://phabricator.haskell.org/D3501
>---------------------------------------------------------------
579bb7669f40ed01841dd197ee535cf26fa19580
compiler/backpack/DriverBkp.hs | 3 +--
compiler/main/Packages.hs | 2 +-
libraries/Cabal | 2 +-
libraries/ghc-boot/GHC/PackageDb.hs | 17 ++++++-----------
.../tests/backpack/cabal/bkpcabal06/bkpcabal06.stderr | 4 ++--
utils/ghc-cabal/Main.hs | 3 ++-
utils/ghc-pkg/Main.hs | 11 ++---------
7 files changed, 15 insertions(+), 27 deletions(-)
diff --git a/compiler/backpack/DriverBkp.hs b/compiler/backpack/DriverBkp.hs
index d85b80d..db7b5f6 100644
--- a/compiler/backpack/DriverBkp.hs
+++ b/compiler/backpack/DriverBkp.hs
@@ -308,8 +308,7 @@ buildUnit session cid insts lunit = do
packageName = compat_pn,
packageVersion = makeVersion [0],
unitId = toInstalledUnitId (thisPackage dflags),
- mungedPackageName = Nothing,
- libName = Nothing,
+ sourceLibName = Nothing,
componentId = cid,
instantiatedWith = insts,
-- Slight inefficiency here haha
diff --git a/compiler/main/Packages.hs b/compiler/main/Packages.hs
index 10ef0d4..2c5833f 100644
--- a/compiler/main/Packages.hs
+++ b/compiler/main/Packages.hs
@@ -1940,7 +1940,7 @@ componentIdString :: DynFlags -> ComponentId -> Maybe String
componentIdString dflags cid = do
conf <- lookupInstalledPackage dflags (componentIdToInstalledUnitId cid)
return $
- case libName conf of
+ case sourceLibName conf of
Nothing -> sourcePackageIdString conf
Just (PackageName libname) ->
packageNameString conf
diff --git a/libraries/Cabal b/libraries/Cabal
index e4c36b9..41f416b 160000
--- a/libraries/Cabal
+++ b/libraries/Cabal
@@ -1 +1 @@
-Subproject commit e4c36b9dd51820f2380ce7a66f980c4e7b2e96fc
+Subproject commit 41f416bc27796a3dc87037b66b6fef6f5810bc77
diff --git a/libraries/ghc-boot/GHC/PackageDb.hs b/libraries/ghc-boot/GHC/PackageDb.hs
index ecd82dd..bf83d25 100644
--- a/libraries/ghc-boot/GHC/PackageDb.hs
+++ b/libraries/ghc-boot/GHC/PackageDb.hs
@@ -98,8 +98,7 @@ data InstalledPackageInfo compid srcpkgid srcpkgname instunitid unitid modulenam
sourcePackageId :: srcpkgid,
packageName :: srcpkgname,
packageVersion :: Version,
- mungedPackageName :: Maybe srcpkgname,
- libName :: Maybe srcpkgname,
+ sourceLibName :: Maybe srcpkgname,
abiHash :: String,
depends :: [instunitid],
-- | Like 'depends', but each dependency is annotated with the
@@ -184,8 +183,7 @@ emptyInstalledPackageInfo =
sourcePackageId = fromStringRep BS.empty,
packageName = fromStringRep BS.empty,
packageVersion = Version [] [],
- mungedPackageName = Nothing,
- libName = Nothing,
+ sourceLibName = Nothing,
abiHash = "",
depends = [],
abiDepends = [],
@@ -444,7 +442,7 @@ instance (RepInstalledPackageInfo a b c d e f g) =>
put (InstalledPackageInfo
unitId componentId instantiatedWith sourcePackageId
packageName packageVersion
- mungedPackageName libName
+ sourceLibName
abiHash depends abiDepends importDirs
hsLibraries extraLibraries extraGHCiLibraries
libraryDirs libraryDynDirs
@@ -457,8 +455,7 @@ 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 (fmap toStringRep sourceLibName)
put (toStringRep unitId)
put (toStringRep componentId)
put (map (\(mod_name, mod) -> (toStringRep mod_name, toDbModule mod))
@@ -491,8 +488,7 @@ instance (RepInstalledPackageInfo a b c d e f g) =>
sourcePackageId <- get
packageName <- get
packageVersion <- get
- mungedPackageName <- get
- libName <- get
+ sourceLibName <- get
unitId <- get
componentId <- get
instantiatedWith <- get
@@ -525,8 +521,7 @@ instance (RepInstalledPackageInfo a b c d e f g) =>
instantiatedWith)
(fromStringRep sourcePackageId)
(fromStringRep packageName) packageVersion
- (fmap fromStringRep mungedPackageName)
- (fmap fromStringRep libName)
+ (fmap fromStringRep sourceLibName)
abiHash
(map fromStringRep depends)
(map (\(k,v) -> (fromStringRep k, v)) abiDepends)
diff --git a/testsuite/tests/backpack/cabal/bkpcabal06/bkpcabal06.stderr b/testsuite/tests/backpack/cabal/bkpcabal06/bkpcabal06.stderr
index 8998e65..937ec2f 100644
--- a/testsuite/tests/backpack/cabal/bkpcabal06/bkpcabal06.stderr
+++ b/testsuite/tests/backpack/cabal/bkpcabal06/bkpcabal06.stderr
@@ -1,4 +1,4 @@
sig/P.hsig:1:1: error:
- • ‘p’ is exported by the hsig file, but not exported by the implementing module ‘z-bkpcabal06-z-impl-0.1.0.0:P’
- • while checking that z-bkpcabal06-z-impl-0.1.0.0:P implements signature P in bkpcabal06-0.1.0.0:sig[P=z-bkpcabal06-z-impl-0.1.0.0:P]
+ • ‘p’ is exported by the hsig file, but not exported by the implementing module ‘bkpcabal06-0.1.0.0:P’
+ • while checking that bkpcabal06-0.1.0.0:P implements signature P in bkpcabal06-0.1.0.0:sig[P=bkpcabal06-0.1.0.0:P]
diff --git a/utils/ghc-cabal/Main.hs b/utils/ghc-cabal/Main.hs
index 608517e..8a1c2c1 100644
--- a/utils/ghc-cabal/Main.hs
+++ b/utils/ghc-cabal/Main.hs
@@ -20,6 +20,7 @@ import Distribution.Simple.Utils (defaultPackageDesc, writeFileAtomic, toUTF8)
import Distribution.Simple.Build (writeAutogenFiles)
import Distribution.Simple.Register
import Distribution.Text
+import Distribution.Types.MungedPackageId
import Distribution.Verbosity
import qualified Distribution.InstalledPackageInfo as Installed
import qualified Distribution.Simple.PackageIndex as PackageIndex
@@ -383,7 +384,7 @@ generate directory distdir dll0Modules config_args
depLibNames
| packageKeySupported comp = dep_ipids
| otherwise = deps
- depNames = map (display . packageName) dep_ids
+ depNames = map (display . mungedName) dep_ids
transitive_dep_ids = map Installed.sourcePackageId dep_pkgs
transitiveDeps = map display transitive_dep_ids
diff --git a/utils/ghc-pkg/Main.hs b/utils/ghc-pkg/Main.hs
index ed73c29..9e18c97 100644
--- a/utils/ghc-pkg/Main.hs
+++ b/utils/ghc-pkg/Main.hs
@@ -1236,16 +1236,9 @@ convertPackageInfoToCacheFormat pkg =
GhcPkg.componentId = installedComponentId pkg,
GhcPkg.instantiatedWith = instantiatedWith pkg,
GhcPkg.sourcePackageId = sourcePackageId pkg,
- GhcPkg.packageName =
- case sourcePackageName pkg of
- Nothing -> packageName pkg
- Just pn -> pn,
+ GhcPkg.packageName = packageName pkg,
GhcPkg.packageVersion = Version.Version (versionNumbers (packageVersion pkg)) [],
- GhcPkg.mungedPackageName =
- case sourcePackageName pkg of
- Nothing -> Nothing
- Just _ -> Just (packageName pkg),
- GhcPkg.libName =
+ GhcPkg.sourceLibName =
fmap (mkPackageName . unUnqualComponentName) (sourceLibName pkg),
GhcPkg.depends = depends pkg,
GhcPkg.abiDepends = map (\(AbiDependency k v) -> (k,unAbiHash v)) (abiDepends pkg),
More information about the ghc-commits
mailing list