Commit a0d0b48b authored by Oleg Grenrus's avatar Oleg Grenrus

Motify/tag some DEPRECATED messages to be removed in Cabal-3.0

parent 9963b168
......@@ -79,7 +79,7 @@ validModuleComponent [] = False
validModuleComponent (c:cs) = isUpper c
&& all validModuleChar cs
{-# DEPRECATED simple "use ModuleName.fromString instead" #-}
{-# DEPRECATED simple "use ModuleName.fromString instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
simple :: String -> ModuleName
simple str = ModuleName (stlFromStrings [str])
......
......@@ -87,7 +87,7 @@ instance HasMungedPackageId MungedPackageId where
class Package pkg => HasUnitId pkg where
installedUnitId :: pkg -> UnitId
{-# DEPRECATED installedPackageId "Use installedUnitId instead" #-}
{-# DEPRECATED installedPackageId "Use installedUnitId instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
-- | Compatibility wrapper for Cabal pre-1.24.
installedPackageId :: HasUnitId pkg => pkg -> UnitId
installedPackageId = installedUnitId
......
......@@ -471,7 +471,7 @@ finalizePD userflags enabled satisfyDep
then DepOk
else MissingDeps missingDeps
{-# DEPRECATED finalizePackageDescription "This function now always assumes tests and benchmarks are disabled; use finalizePD with ComponentRequestedSpec to specify something more specific." #-}
{-# 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. Oct 2018)." #-}
finalizePackageDescription ::
FlagAssignment -- ^ Explicitly specified flag assignments
-> (Dependency -> Bool) -- ^ Is a given dependency satisfiable from the set of
......
......@@ -9,7 +9,7 @@
--
-- Utilities for pretty printing.
{-# OPTIONS_HADDOCK hide #-}
module Distribution.PrettyUtils {-# DEPRECATED "Use Distribution.Pretty" #-} (
module Distribution.PrettyUtils {-# DEPRECATED "Use Distribution.Pretty. This module will be removed in Cabal-3.0 (est. Oct 2018)." #-} (
Separator,
-- * Internal
showFilePath,
......
......@@ -47,7 +47,7 @@ parseReadE (ReadE p) = do
readEOrFail :: ReadE a -> String -> a
readEOrFail r = either error id . runReadE r
-- {-# DEPRECATED readP_to_E "Use parsecToReadE" #-}
-- {-# DEPRECATED readP_to_E "Use parsecToReadE. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
readP_to_E :: (String -> ErrorMsg) -> ReadP a a -> ReadE a
readP_to_E err r =
ReadE $ \txt -> case [ p | (p, s) <- readP_to_S r txt
......
......@@ -303,7 +303,7 @@ deleteUnitId ipkgid original@(PackageIndex pids pnames) =
. List.deleteBy (\_ pkg -> installedUnitId pkg == ipkgid) undefined
-- | Backwards compatibility wrapper for Cabal pre-1.24.
{-# DEPRECATED deleteInstalledPackageId "Use deleteUnitId instead" #-}
{-# DEPRECATED deleteInstalledPackageId "Use deleteUnitId instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
deleteInstalledPackageId :: UnitId -> InstalledPackageIndex
-> InstalledPackageIndex
deleteInstalledPackageId = deleteUnitId
......@@ -419,7 +419,7 @@ lookupComponentId index cid =
Map.lookup (newSimpleUnitId cid) (unitIdIndex index)
-- | Backwards compatibility for Cabal pre-1.24.
{-# DEPRECATED lookupInstalledPackageId "Use lookupUnitId instead" #-}
{-# DEPRECATED lookupInstalledPackageId "Use lookupUnitId instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
lookupInstalledPackageId :: PackageIndex a -> UnitId
-> Maybe a
lookupInstalledPackageId = lookupUnitId
......
......@@ -200,42 +200,41 @@ getDbProgramOutput verbosity prog programDb args =
-- Deprecated aliases
--
{-# DEPRECATED rawSystemProgram "use runProgram instead" #-}
{-# DEPRECATED rawSystemProgram "use runProgram instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
rawSystemProgram :: Verbosity -> ConfiguredProgram
-> [ProgArg] -> IO ()
rawSystemProgram = runProgram
{-# DEPRECATED rawSystemProgramStdout "use getProgramOutput instead" #-}
{-# DEPRECATED rawSystemProgramStdout "use getProgramOutput instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
rawSystemProgramStdout :: Verbosity -> ConfiguredProgram
-> [ProgArg] -> IO String
rawSystemProgramStdout = getProgramOutput
{-# DEPRECATED rawSystemProgramConf "use runDbProgram instead" #-}
{-# DEPRECATED rawSystemProgramConf "use runDbProgram instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
rawSystemProgramConf :: Verbosity -> Program -> ProgramConfiguration
-> [ProgArg] -> IO ()
rawSystemProgramConf = runDbProgram
{-# DEPRECATED rawSystemProgramStdoutConf "use getDbProgramOutput instead" #-}
{-# DEPRECATED rawSystemProgramStdoutConf "use getDbProgramOutput instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
rawSystemProgramStdoutConf :: Verbosity -> Program -> ProgramConfiguration
-> [ProgArg] -> IO String
rawSystemProgramStdoutConf = getDbProgramOutput
{-# DEPRECATED ProgramConfiguration "use ProgramDb instead" #-}
{-# DEPRECATED ProgramConfiguration "use ProgramDb instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
type ProgramConfiguration = ProgramDb
{-# DEPRECATED emptyProgramConfiguration "use emptyProgramDb instead" #-}
{-# DEPRECATED defaultProgramConfiguration "use defaultProgramDb instead" #-}
{-# DEPRECATED emptyProgramConfiguration "use emptyProgramDb instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
{-# DEPRECATED defaultProgramConfiguration "use defaultProgramDb instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
emptyProgramConfiguration, defaultProgramConfiguration :: ProgramConfiguration
emptyProgramConfiguration = emptyProgramDb
defaultProgramConfiguration = defaultProgramDb
{-# DEPRECATED restoreProgramConfiguration
"use restoreProgramDb instead" #-}
{-# DEPRECATED restoreProgramConfiguration "use restoreProgramDb instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
restoreProgramConfiguration :: [Program] -> ProgramConfiguration
-> ProgramConfiguration
restoreProgramConfiguration = restoreProgramDb
{-# DEPRECATED findProgramOnPath "use findProgramOnSearchPath instead" #-}
{-# DEPRECATED findProgramOnPath "use findProgramOnSearchPath instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
findProgramOnPath :: String -> Verbosity -> IO (Maybe FilePath)
findProgramOnPath name verbosity =
fmap (fmap fst) $
......
......@@ -306,7 +306,7 @@ parseFlagAssignment = mkFlagAssignment <$>
+++ (do _ <- Parse.char '-'
f <- parse
return (f, False))
-- {-# DEPRECATED parseFlagAssignment "Use parsecFlagAssignment" #-}
-- {-# DEPRECATED parseFlagAssignment "Use parsecFlagAssignment. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
-- | A @ConfVar@ represents the variable type used.
data ConfVar = OS OS
......
......@@ -80,6 +80,6 @@ libModulesAutogen lib = autogenModules (libBuildInfo lib)
-- in the package description ('explicitLibModules'); unfortunately, the
-- type signature for 'allLibModules' is incompatible since we need a
-- 'ComponentLocalBuildInfo'.
{-# DEPRECATED libModules "If you want all modules that are built with a library, use 'allLibModules'. Otherwise, use 'explicitLibModules' for ONLY the modules explicitly mentioned in the package description." #-}
{-# DEPRECATED libModules "If you want all modules that are built with a library, use 'allLibModules'. Otherwise, use 'explicitLibModules' for ONLY the modules explicitly mentioned in the package description. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
libModules :: Library -> [ModuleName]
libModules = explicitLibModules
......@@ -186,7 +186,7 @@ descCabalVersion :: PackageDescription -> VersionRange
descCabalVersion pkg = case specVersionRaw pkg of
Left version -> orLaterVersion version
Right versionRange -> versionRange
{-# DEPRECATED descCabalVersion "Use specVersion instead" #-}
{-# DEPRECATED descCabalVersion "Use specVersion instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
-- | The effective @build-type@ after applying defaulting rules.
--
......
......@@ -68,7 +68,7 @@ import Text.PrettyPrint (text)
newtype UnitId = UnitId ShortText
deriving (Generic, Read, Show, Eq, Ord, Typeable, Data, NFData)
{-# DEPRECATED InstalledPackageId "Use UnitId instead" #-}
{-# DEPRECATED InstalledPackageId "Use UnitId instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
type InstalledPackageId = UnitId
instance Binary UnitId
......
......@@ -810,7 +810,7 @@ data KnownExtension =
instance Binary KnownExtension
{-# DEPRECATED knownExtensions
"KnownExtension is an instance of Enum and Bounded, use those instead." #-}
"KnownExtension is an instance of Enum and Bounded, use those instead. This symbol will be removed in Cabal-3.0 (est. Oct 2018)." #-}
knownExtensions :: [KnownExtension]
knownExtensions = [minBound..maxBound]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment