Skip to content

Commit 4a74929

Browse files
committed
Remove a bunch of previously deprecated stuff.
1 parent 653041b commit 4a74929

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+646
-1068
lines changed

Cabal/Cabal.cabal

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,7 @@ library
447447
Distribution.Types.TargetInfo
448448
Distribution.Types.Version
449449
Distribution.Types.VersionRange
450+
Distribution.Types.VersionRange.Internal
450451
Distribution.Types.VersionInterval
451452
Distribution.Types.GivenComponent
452453
Distribution.Types.PackageVersionConstraint

Cabal/Distribution/InstalledPackageInfo.hs

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727
module Distribution.InstalledPackageInfo (
2828
InstalledPackageInfo(..),
29-
installedPackageId,
3029
installedComponentId,
3130
installedOpenUnitId,
3231
sourceComponentName,
@@ -50,7 +49,7 @@ import Distribution.CabalSpecVersion (cabalSpecLatest)
5049
import Distribution.FieldGrammar
5150
import Distribution.FieldGrammar.FieldDescrs
5251
import Distribution.ModuleName
53-
import Distribution.Package hiding (installedPackageId, installedUnitId)
52+
import Distribution.Package hiding (installedUnitId)
5453
import Distribution.Types.ComponentName
5554
import Distribution.Utils.Generic (toUTF8BS)
5655

@@ -83,15 +82,6 @@ installedOpenUnitId ipi
8382
requiredSignatures :: InstalledPackageInfo -> Set ModuleName
8483
requiredSignatures ipi = openModuleSubstFreeHoles (Map.fromList (instantiatedWith ipi))
8584

86-
{-# DEPRECATED installedPackageId "Use installedUnitId instead" #-}
87-
-- | Backwards compatibility with Cabal pre-1.24.
88-
--
89-
-- This type synonym is slightly awful because in cabal-install
90-
-- we define an 'InstalledPackageId' but it's a ComponentId,
91-
-- not a UnitId!
92-
installedPackageId :: InstalledPackageInfo -> UnitId
93-
installedPackageId = installedUnitId
94-
9585
-- -----------------------------------------------------------------------------
9686
-- Munging
9787

Cabal/Distribution/Make.hs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
module Distribution.Make (
6161
module Distribution.Package,
6262
License(..), Version,
63-
defaultMain, defaultMainArgs, defaultMainNoRead
63+
defaultMain, defaultMainArgs
6464
) where
6565

6666
import Prelude ()
@@ -70,7 +70,6 @@ import Distribution.Compat.Prelude
7070
import Distribution.Compat.Exception
7171
import Distribution.Package
7272
import Distribution.Simple.Program
73-
import Distribution.PackageDescription
7473
import Distribution.Simple.Setup
7574
import Distribution.Simple.Command
7675

@@ -89,10 +88,6 @@ defaultMain = getArgs >>= defaultMainArgs
8988
defaultMainArgs :: [String] -> IO ()
9089
defaultMainArgs = defaultMainHelper
9190

92-
{-# DEPRECATED defaultMainNoRead "it ignores its PackageDescription arg" #-}
93-
defaultMainNoRead :: PackageDescription -> IO ()
94-
defaultMainNoRead = const defaultMain
95-
9691
defaultMainHelper :: [String] -> IO ()
9792
defaultMainHelper args =
9893
case commandsRun (globalCommand commands) commands args of

Cabal/Distribution/ModuleName.hs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ module Distribution.ModuleName (
1919
components,
2020
toFilePath,
2121
main,
22-
simple,
2322
-- * Internal
2423
validModuleComponent,
2524
) where
@@ -66,10 +65,6 @@ validModuleComponent [] = False
6665
validModuleComponent (c:cs) = isUpper c
6766
&& all validModuleChar cs
6867

69-
{-# DEPRECATED simple "use ModuleName.fromString instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-}
70-
simple :: String -> ModuleName
71-
simple str = ModuleName (stlFromStrings [str])
72-
7368
-- | Construct a 'ModuleName' from a valid module name 'String'.
7469
--
7570
-- This is just a convenience function intended for valid module strings. It is

Cabal/Distribution/Package.hs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ module Distribution.Package
2828
, Package(..), packageName, packageVersion
2929
, HasMungedPackageId(..), mungedName', mungedVersion'
3030
, HasUnitId(..)
31-
, installedPackageId
3231
, PackageInstalled(..)
3332
) where
3433

@@ -87,11 +86,6 @@ instance HasMungedPackageId MungedPackageId where
8786
class Package pkg => HasUnitId pkg where
8887
installedUnitId :: pkg -> UnitId
8988

90-
{-# DEPRECATED installedPackageId "Use installedUnitId instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-}
91-
-- | Compatibility wrapper for Cabal pre-1.24.
92-
installedPackageId :: HasUnitId pkg => pkg -> UnitId
93-
installedPackageId = installedUnitId
94-
9589
-- | Class of installed packages.
9690
--
9791
-- The primary data type which is an instance of this package is

Cabal/Distribution/PackageDescription.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ module Distribution.PackageDescription (
1717
specVersion,
1818
buildType,
1919
license,
20-
descCabalVersion,
2120
BuildType(..),
2221
knownBuildTypes,
2322
allLibraries,
@@ -35,7 +34,6 @@ module Distribution.PackageDescription (
3534
hasLibs,
3635
explicitLibModules,
3736
libModulesAutogen,
38-
libModules,
3937

4038
-- ** Executables
4139
Executable(..),

Cabal/Distribution/PackageDescription/Configuration.hs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
module Distribution.PackageDescription.Configuration (
1919
finalizePD,
20-
finalizePackageDescription,
2120
flattenPackageDescription,
2221

2322
-- Utils
@@ -492,20 +491,6 @@ finalizePD userflags enabled satisfyDep
492491
then DepOk
493492
else MissingDeps missingDeps
494493

495-
{-# DEPRECATED finalizePackageDescription "This function now always assumes tests and benchmarks are disabled; use finalizePD with ComponentRequestedSpec to specify something more specific. This symbol will be removed in Cabal-3.0 (est. Mar 2019)." #-}
496-
finalizePackageDescription ::
497-
FlagAssignment -- ^ Explicitly specified flag assignments
498-
-> (Dependency -> Bool) -- ^ Is a given dependency satisfiable from the set of
499-
-- available packages? If this is unknown then use
500-
-- True.
501-
-> Platform -- ^ The 'Arch' and 'OS'
502-
-> CompilerInfo -- ^ Compiler information
503-
-> [Dependency] -- ^ Additional constraints
504-
-> GenericPackageDescription
505-
-> Either [Dependency]
506-
(PackageDescription, FlagAssignment)
507-
finalizePackageDescription flags = finalizePD flags defaultComponentRequestedSpec
508-
509494
{-
510495
let tst_p = (CondNode [1::Int] [Distribution.Package.Dependency "a" AnyVersion] [])
511496
let tst_p2 = (CondNode [1::Int] [Distribution.Package.Dependency "a" (EarlierVersion (Version [1,0] [])), Distribution.Package.Dependency "a" (LaterVersion (Version [2,0] []))] [])

0 commit comments

Comments
 (0)