summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-04-02 16:00:37 +0200
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-04-30 01:56:56 -0400
commit69562e34fb5d9571e9efc1cb90c879e50129a510 (patch)
tree37862ab1621eab67e9ad1e6e363e63c8c175609e
parent10a2ba90aa6a788677104cc43318c66f46e2e2b0 (diff)
downloadhaskell-69562e34fb5d9571e9efc1cb90c879e50129a510.tar.gz
Remove unused `emptyGenericUnitInfo`
-rw-r--r--compiler/GHC/Unit/Info.hs4
-rw-r--r--libraries/ghc-boot/GHC/PackageDb.hs36
2 files changed, 0 insertions, 40 deletions
diff --git a/compiler/GHC/Unit/Info.hs b/compiler/GHC/Unit/Info.hs
index 80029dcaa5..010bb5ebf3 100644
--- a/compiler/GHC/Unit/Info.hs
+++ b/compiler/GHC/Unit/Info.hs
@@ -22,7 +22,6 @@ module GHC.Unit.Info (
PackageId(..),
PackageName(..),
Version(..),
- defaultUnitInfo,
unitPackageNameString,
unitPackageIdString,
pprUnitInfo,
@@ -83,9 +82,6 @@ instance Outputable PackageId where
instance Outputable PackageName where
ppr (PackageName str) = ftext str
-defaultUnitInfo :: UnitInfo
-defaultUnitInfo = emptyGenericUnitInfo
-
unitPackageIdString :: UnitInfo -> String
unitPackageIdString pkg = unpackFS str
where
diff --git a/libraries/ghc-boot/GHC/PackageDb.hs b/libraries/ghc-boot/GHC/PackageDb.hs
index b0d7a179cb..bc6cdbcc6d 100644
--- a/libraries/ghc-boot/GHC/PackageDb.hs
+++ b/libraries/ghc-boot/GHC/PackageDb.hs
@@ -48,7 +48,6 @@
--
module GHC.PackageDb
( GenericUnitInfo(..)
- , emptyGenericUnitInfo
-- * Read and write
, DbMode(..)
, DbOpenMode(..)
@@ -282,41 +281,6 @@ class BinaryStringRep a where
fromStringRep :: BS.ByteString -> a
toStringRep :: a -> BS.ByteString
-emptyGenericUnitInfo :: RepGenericUnitInfo a b c d e f g
- => GenericUnitInfo a b c d e f g
-emptyGenericUnitInfo =
- GenericUnitInfo {
- unitId = fromStringRep BS.empty,
- unitInstanceOf = fromStringRep BS.empty,
- unitInstantiations = [],
- unitPackageId = fromStringRep BS.empty,
- unitPackageName = fromStringRep BS.empty,
- unitPackageVersion = Version [] [],
- unitComponentName = Nothing,
- unitAbiHash = "",
- unitDepends = [],
- unitAbiDepends = [],
- unitImportDirs = [],
- unitLibraries = [],
- unitExtDepLibsSys = [],
- unitExtDepLibsGhc = [],
- unitLibraryDirs = [],
- unitLibraryDynDirs = [],
- unitExtDepFrameworks = [],
- unitExtDepFrameworkDirs = [],
- unitLinkerOptions = [],
- unitCcOptions = [],
- unitIncludes = [],
- unitIncludeDirs = [],
- unitHaddockInterfaces = [],
- unitHaddockHTMLs = [],
- unitExposedModules = [],
- unitHiddenModules = [],
- unitIsIndefinite = False,
- unitIsExposed = False,
- unitIsTrusted = False
- }
-
-- | Represents a lock of a package db.
newtype PackageDbLock = PackageDbLock Handle