diff options
Diffstat (limited to 'compiler/GHC/Unit/Info.hs')
-rw-r--r-- | compiler/GHC/Unit/Info.hs | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/compiler/GHC/Unit/Info.hs b/compiler/GHC/Unit/Info.hs index 2f4a9a607c..b8a238927b 100644 --- a/compiler/GHC/Unit/Info.hs +++ b/compiler/GHC/Unit/Info.hs @@ -60,7 +60,7 @@ import Data.List (isPrefixOf, stripPrefix) -- -- These two identifiers are different for wired-in packages. See Note [About -- Units] in "GHC.Unit" -type GenUnitInfo unit = GenericUnitInfo (Indefinite unit) PackageId PackageName unit ModuleName (GenModule (GenUnit unit)) +type GenUnitInfo unit = GenericUnitInfo PackageId PackageName unit ModuleName (GenModule (GenUnit unit)) -- | Information about an installed unit (units are identified by their database -- UnitKey) @@ -74,7 +74,6 @@ type UnitInfo = GenUnitInfo UnitId mkUnitKeyInfo :: DbUnitInfo -> UnitKeyInfo mkUnitKeyInfo = mapGenericUnitInfo mkUnitKey' - mkIndefUnitKey' mkPackageIdentifier' mkPackageName' mkModuleName' @@ -84,9 +83,8 @@ mkUnitKeyInfo = mapGenericUnitInfo mkPackageName' = PackageName . mkFastStringByteString mkUnitKey' = UnitKey . mkFastStringByteString mkModuleName' = mkModuleNameFS . mkFastStringByteString - mkIndefUnitKey' cid = Indefinite (mkUnitKey' cid) mkVirtUnitKey' i = case i of - DbInstUnitId cid insts -> mkVirtUnit (mkIndefUnitKey' cid) (fmap (bimap mkModuleName' mkModule') insts) + DbInstUnitId cid insts -> mkVirtUnit (mkUnitKey' cid) (fmap (bimap mkModuleName' mkModule') insts) DbUnitId uid -> RealUnit (Definite (mkUnitKey' uid)) mkModule' m = case m of DbModule uid n -> mkModule (mkVirtUnitKey' uid) (mkModuleName' n) @@ -96,7 +94,6 @@ mkUnitKeyInfo = mapGenericUnitInfo mapUnitInfo :: IsUnitId v => (u -> v) -> GenUnitInfo u -> GenUnitInfo v mapUnitInfo f = mapGenericUnitInfo f -- unit identifier - (fmap f) -- indefinite unit identifier id -- package identifier id -- package name id -- module name |