summaryrefslogtreecommitdiff
path: root/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'libraries')
m---------libraries/Cabal0
-rw-r--r--libraries/base/base.cabal4
-rw-r--r--libraries/bin-package-db/Distribution/InstalledPackageInfo/Binary.hs11
-rw-r--r--libraries/ghc-prim/ghc-prim.cabal4
-rw-r--r--libraries/integer-gmp/integer-gmp.cabal4
-rw-r--r--libraries/integer-simple/integer-simple.cabal2
-rw-r--r--libraries/template-haskell/template-haskell.cabal4
7 files changed, 20 insertions, 9 deletions
diff --git a/libraries/Cabal b/libraries/Cabal
-Subproject 96847693bf8ff48ae94f179d60c1f23411e1365
+Subproject 6cc46998f0778c04b535c805416604995fe153b
diff --git a/libraries/base/base.cabal b/libraries/base/base.cabal
index e56724ce4f..b7828a9c20 100644
--- a/libraries/base/base.cabal
+++ b/libraries/base/base.cabal
@@ -328,6 +328,6 @@ Library
GHC.Event.TimerManager
GHC.Event.Unique
- -- We need to set the package name to base (without a version number)
+ -- We need to set the package key to base (without a version number)
-- as it's magic.
- ghc-options: -package-name base
+ ghc-options: -this-package-key base
diff --git a/libraries/bin-package-db/Distribution/InstalledPackageInfo/Binary.hs b/libraries/bin-package-db/Distribution/InstalledPackageInfo/Binary.hs
index f4d0a4b147..baf8a05159 100644
--- a/libraries/bin-package-db/Distribution/InstalledPackageInfo/Binary.hs
+++ b/libraries/bin-package-db/Distribution/InstalledPackageInfo/Binary.hs
@@ -49,6 +49,7 @@ putInstalledPackageInfo :: Binary m => InstalledPackageInfo_ m -> Put
putInstalledPackageInfo ipi = do
put (sourcePackageId ipi)
put (installedPackageId ipi)
+ put (packageKey ipi)
put (license ipi)
put (copyright ipi)
put (maintainer ipi)
@@ -84,6 +85,7 @@ getInstalledPackageInfo :: Binary m => Get (InstalledPackageInfo_ m)
getInstalledPackageInfo = do
sourcePackageId <- get
installedPackageId <- get
+ packageKey <- get
license <- get
copyright <- get
maintainer <- get
@@ -166,3 +168,12 @@ instance Binary m => Binary (ModuleExport m) where
put (ModuleExport a b c d) = do put a; put b; put c; put d
get = do a <- get; b <- get; c <- get; d <- get;
return (ModuleExport a b c d)
+
+instance Binary PackageKey where
+ put (PackageKey a b c) = do putWord8 0; put a; put b; put c
+ put (OldPackageKey a) = do putWord8 1; put a
+ get = do n <- getWord8
+ case n of
+ 0 -> do a <- get; b <- get; c <- get; return (PackageKey a b c)
+ 1 -> do a <- get; return (OldPackageKey a)
+ _ -> error ("Binary PackageKey: bad branch " ++ show n)
diff --git a/libraries/ghc-prim/ghc-prim.cabal b/libraries/ghc-prim/ghc-prim.cabal
index bc9f57126a..9c1801b4d6 100644
--- a/libraries/ghc-prim/ghc-prim.cabal
+++ b/libraries/ghc-prim/ghc-prim.cabal
@@ -59,6 +59,6 @@ Library
cbits/popcnt.c
cbits/word2float.c
- -- We need to set the package name to ghc-prim (without a version number)
+ -- We need to set the package key to ghc-prim (without a version number)
-- as it's magic.
- ghc-options: -package-name ghc-prim
+ ghc-options: -this-package-key ghc-prim
diff --git a/libraries/integer-gmp/integer-gmp.cabal b/libraries/integer-gmp/integer-gmp.cabal
index c0f6b60aa4..376139f102 100644
--- a/libraries/integer-gmp/integer-gmp.cabal
+++ b/libraries/integer-gmp/integer-gmp.cabal
@@ -75,6 +75,6 @@ Library
build-depends: ghc-prim >= 0.3.1 && < 0.4
- -- We need to set the package name to integer-gmp
+ -- We need to set the package key to integer-gmp
-- (without a version number) as it's magic.
- ghc-options: -Wall -package-name integer-gmp
+ ghc-options: -Wall -this-package-key integer-gmp
diff --git a/libraries/integer-simple/integer-simple.cabal b/libraries/integer-simple/integer-simple.cabal
index 51d3cc7b5b..d18a182012 100644
--- a/libraries/integer-simple/integer-simple.cabal
+++ b/libraries/integer-simple/integer-simple.cabal
@@ -28,4 +28,4 @@ Library
UnliftedFFITypes, NoImplicitPrelude
-- We need to set the package name to integer-simple
-- (without a version number) as it's magic.
- ghc-options: -package-name integer-simple -Wall
+ ghc-options: -this-package-key integer-simple -Wall
diff --git a/libraries/template-haskell/template-haskell.cabal b/libraries/template-haskell/template-haskell.cabal
index fb8dbd7ab0..db268be212 100644
--- a/libraries/template-haskell/template-haskell.cabal
+++ b/libraries/template-haskell/template-haskell.cabal
@@ -49,6 +49,6 @@ Library
base == 4.7.*,
pretty == 1.1.*
- -- We need to set the package name to template-haskell (without a
+ -- We need to set the package key to template-haskell (without a
-- version number) as it's magic.
- ghc-options: -Wall -package-name template-haskell
+ ghc-options: -Wall -this-package-key template-haskell