diff options
Diffstat (limited to 'compiler/GHC/Unit/State.hs')
| -rw-r--r-- | compiler/GHC/Unit/State.hs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/compiler/GHC/Unit/State.hs b/compiler/GHC/Unit/State.hs index ac1b220918..aa1318ad5d 100644 --- a/compiler/GHC/Unit/State.hs +++ b/compiler/GHC/Unit/State.hs @@ -954,26 +954,12 @@ sortByPreference prec_map = sortBy (flip (compareByPreference prec_map)) -- Pursuant to #12518, we could change this policy to, for example, remove -- the version preference, meaning that we would always prefer the units -- in later unit database. --- --- Instead, we use that preference based policy only when one of the packages --- is integer-gmp and the other is integer-simple. --- This currently only happens when we're looking up which concrete --- package to use in place of @integer-wired-in@ and that two different --- package databases supply a different integer library. For more about --- the fake @integer-wired-in@ package, see Note [The integer library] --- in the @GHC.Builtin.Names@ module. compareByPreference :: UnitPrecedenceMap -> UnitInfo -> UnitInfo -> Ordering compareByPreference prec_map pkg pkg' - | Just prec <- Map.lookup (unitId pkg) prec_map - , Just prec' <- Map.lookup (unitId pkg') prec_map - , differentIntegerPkgs pkg pkg' - = compare prec prec' - - | otherwise = case comparing unitPackageVersion pkg pkg' of GT -> GT EQ | Just prec <- Map.lookup (unitId pkg) prec_map @@ -985,12 +971,6 @@ compareByPreference prec_map pkg pkg' -> EQ LT -> LT - where isIntegerPkg p = unitPackageNameString p `elem` - ["integer-simple", "integer-gmp"] - differentIntegerPkgs p p' = - isIntegerPkg p && isIntegerPkg p' && - (unitPackageName p /= unitPackageName p') - comparing :: Ord a => (t -> a) -> t -> t -> Ordering comparing f a b = f a `compare` f b @@ -1054,10 +1034,6 @@ findWiredInUnits printer prec_map pkgs vis_map = do -- in Note [Wired-in units] in GHC.Unit.Module let matches :: UnitInfo -> UnitId -> Bool - pc `matches` pid - -- See Note [The integer library] in GHC.Builtin.Names - | pid == integerUnitId - = unitPackageNameString pc `elem` ["integer-gmp", "integer-simple"] pc `matches` pid = unitPackageName pc == PackageName (unitIdFS pid) -- find which package corresponds to each wired-in package |
