From 69562e34fb5d9571e9efc1cb90c879e50129a510 Mon Sep 17 00:00:00 2001
From: Sylvain Henry <sylvain@haskus.fr>
Date: Thu, 2 Apr 2020 16:00:37 +0200
Subject: [PATCH] Remove unused `emptyGenericUnitInfo`

---
 compiler/GHC/Unit/Info.hs           |  4 ----
 libraries/ghc-boot/GHC/PackageDb.hs | 36 -----------------------------
 2 files changed, 40 deletions(-)

diff --git a/compiler/GHC/Unit/Info.hs b/compiler/GHC/Unit/Info.hs
index 80029dcaa58b..010bb5ebf33a 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 b0d7a179cbd7..bc6cdbcc6d9f 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
 
-- 
GitLab