diff options
-rw-r--r-- | compiler/backpack/DriverBkp.hs | 3 | ||||
-rw-r--r-- | compiler/main/Packages.hs | 2 | ||||
m--------- | libraries/Cabal | 0 | ||||
-rw-r--r-- | libraries/ghc-boot/GHC/PackageDb.hs | 17 | ||||
-rw-r--r-- | testsuite/tests/backpack/cabal/bkpcabal06/bkpcabal06.stderr | 4 | ||||
-rw-r--r-- | utils/ghc-cabal/Main.hs | 3 | ||||
-rw-r--r-- | utils/ghc-pkg/Main.hs | 11 |
7 files changed, 14 insertions, 26 deletions
diff --git a/compiler/backpack/DriverBkp.hs b/compiler/backpack/DriverBkp.hs index d85b80dbc2..db7b5f63bc 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 10ef0d42ec..2c5833fae4 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 -Subproject e4c36b9dd51820f2380ce7a66f980c4e7b2e96f +Subproject 41f416bc27796a3dc87037b66b6fef6f5810bc7 diff --git a/libraries/ghc-boot/GHC/PackageDb.hs b/libraries/ghc-boot/GHC/PackageDb.hs index ecd82dd309..bf83d25baa 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 8998e6555e..937ec2f055 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 608517ea8b..8a1c2c1755 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 ed73c2960b..9e18c97bc1 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), |