Commit f2ff8331 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov

s/defaultProgramConfiguration/defaultProgramDb/

parent 0ce8bd9b
......@@ -115,7 +115,7 @@ defaultMainHelper args =
printVersion = putStrLn $ "Cabal library version "
++ display cabalVersion
progs = defaultProgramConfiguration
progs = defaultProgramDb
commands =
[configureCommand progs `commandAddAction` configureAction
,buildCommand progs `commandAddAction` buildAction
......
......@@ -156,7 +156,7 @@ defaultMainHelper hooks args = topHandler $
printVersion = putStrLn $ "Cabal library version "
++ display cabalVersion
progs = addKnownPrograms (hookedPrograms hooks) defaultProgramConfiguration
progs = addKnownPrograms (hookedPrograms hooks) defaultProgramDb
commands =
[configureCommand progs `commandAddAction` \fs as ->
configureAction hooks fs as >> return ()
......
......@@ -1521,7 +1521,7 @@ configCompilerAuxEx cfg = configCompilerEx (flagToMaybe $ configHcFlavor cfg)
programsConfig
(fromFlag (configVerbosity cfg))
where
programsConfig = mkProgramsConfig cfg defaultProgramConfiguration
programsConfig = mkProgramsConfig cfg defaultProgramDb
configCompilerEx :: Maybe CompilerFlavor -> Maybe FilePath -> Maybe FilePath
-> ProgramDb -> Verbosity
......
......@@ -18,7 +18,7 @@
-- state component of it.
--
-- The module also defines all the known built-in 'Program's and the
-- 'defaultProgramConfiguration' which contains them all.
-- 'defaultProgramDb' which contains them all.
--
-- One nice thing about using it is that any program that is
-- registered with Cabal will get some \"configure\" and \".cabal\"
......
......@@ -401,7 +401,7 @@ createArchive verbosity pkg_descr mb_lbi tmpDir targetPref = do
let tarBallFilePath = targetPref </> tarBallName pkg_descr <.> "tar.gz"
(tarProg, _) <- requireProgram verbosity tarProgram
(maybe defaultProgramConfiguration withPrograms mb_lbi)
(maybe defaultProgramDb withPrograms mb_lbi)
let formatOptSupported = maybe False (== "YES") $
Map.lookup "Supports --format"
(programProperties tarProg)
......
......@@ -15,7 +15,7 @@ import Distribution.Simple.Configure
, interpretPackageDbFlags, configCompilerEx )
import Distribution.Simple.Compiler (PackageDB(..), PackageDBStack, CompilerFlavor(GHC))
import Distribution.Simple.LocalBuildInfo (LocalBuildInfo(..))
import Distribution.Simple.Program (defaultProgramConfiguration)
import Distribution.Simple.Program (defaultProgramDb)
import Distribution.Simple.Setup (Flag(..), readPackageDbList, showPackageDbList)
import Distribution.Simple.Utils (cabalVersion)
import Distribution.Text (display)
......@@ -116,7 +116,7 @@ main = do
-- NB: if we accept full ConfigFlags parser then
-- should use (mkProgramsConfig cfg (configPrograms cfg))
-- instead.
defaultProgramConfiguration
defaultProgramDb
(lessVerbose verbosity)
return programsConfig
......@@ -130,7 +130,7 @@ main = do
(_comp, _compPlatform, with_programs)
<- configCompilerEx
(Just GHC) mb_with_ghc_path mb_with_ghc_pkg_path
defaultProgramConfiguration
defaultProgramDb
(lessVerbose verbosity)
return with_programs
......
......@@ -89,7 +89,7 @@ import Distribution.Simple.Command
( CommandUI(commandOptions), commandDefaultFlags, ShowOrParseArgs(..)
, viewAsFieldDescr )
import Distribution.Simple.Program
( defaultProgramConfiguration )
( defaultProgramDb )
import Distribution.Simple.Utils
( die, notice, warn, lowercase, cabalVersion )
import Distribution.Compiler
......@@ -634,7 +634,7 @@ commentSavedConfig = do
savedGlobalFlags = defaultGlobalFlags,
savedInstallFlags = defaultInstallFlags,
savedConfigureExFlags = defaultConfigExFlags,
savedConfigureFlags = (defaultConfigFlags defaultProgramConfiguration) {
savedConfigureFlags = (defaultConfigFlags defaultProgramDb) {
configUserInstall = toFlag defaultUserInstall,
configAllowNewer = Just (AllowNewer RelaxDepsNone),
configAllowOlder = Just (AllowOlder RelaxDepsNone)
......@@ -1047,14 +1047,14 @@ haddockFlagsFields = [ field
withProgramsFields :: [FieldDescr [(String, FilePath)]]
withProgramsFields =
map viewAsFieldDescr $
programConfigurationPaths' (++ "-location") defaultProgramConfiguration
programConfigurationPaths' (++ "-location") defaultProgramDb
ParseArgs id (++)
-- | Fields for the 'program-default-options' section.
withProgramOptionsFields :: [FieldDescr [(String, [String])]]
withProgramOptionsFields =
map viewAsFieldDescr $
programConfigurationOptions defaultProgramConfiguration ParseArgs id (++)
programConfigurationOptions defaultProgramDb ParseArgs id (++)
-- | Get the differences (as a pseudo code diff) between the user's
-- '~/.cabal/config' and the one that cabal would generate if it didn't exist.
......
......@@ -1077,13 +1077,13 @@ buildAndInstallUnpackedPackage verbosity
isParallelBuild = buildSettingNumJobs >= 2
configureCommand = Cabal.configureCommand defaultProgramConfiguration
configureCommand = Cabal.configureCommand defaultProgramDb
configureFlags v = flip filterConfigureFlags v $
setupHsConfigureFlags rpkg pkgshared
verbosity builddir
configureArgs = setupHsConfigureArgs pkg
buildCommand = Cabal.buildCommand defaultProgramConfiguration
buildCommand = Cabal.buildCommand defaultProgramDb
buildFlags _ = setupHsBuildFlags pkg pkgshared verbosity builddir
generateInstalledPackageInfo :: IO InstalledPackageInfo
......@@ -1276,18 +1276,18 @@ buildInplaceUnpackedPackage verbosity
BuildStatusBuild Nothing _ -> action
BuildStatusBuild (Just mipkg) _ -> return mipkg
configureCommand = Cabal.configureCommand defaultProgramConfiguration
configureCommand = Cabal.configureCommand defaultProgramDb
configureFlags v = flip filterConfigureFlags v $
setupHsConfigureFlags rpkg pkgshared
verbosity builddir
configureArgs = setupHsConfigureArgs pkg
buildCommand = Cabal.buildCommand defaultProgramConfiguration
buildCommand = Cabal.buildCommand defaultProgramDb
buildFlags _ = setupHsBuildFlags pkg pkgshared
verbosity builddir
buildArgs = setupHsBuildArgs pkg
replCommand = Cabal.replCommand defaultProgramConfiguration
replCommand = Cabal.replCommand defaultProgramDb
replFlags _ = setupHsReplFlags pkg pkgshared
verbosity builddir
replArgs = setupHsReplArgs pkg
......
......@@ -72,7 +72,7 @@ import Distribution.Solver.Types.Settings
import Distribution.Simple.Compiler (PackageDB)
import Distribution.Simple.Program
( defaultProgramConfiguration )
( defaultProgramDb )
import Distribution.Simple.Command hiding (boolOpt, boolOpt')
import qualified Distribution.Simple.Command as Command
import qualified Distribution.Simple.Setup as Cabal
......@@ -345,7 +345,7 @@ configureCommand = c
++ " with some package-specific flag.\n"
}
where
c = Cabal.configureCommand defaultProgramConfiguration
c = Cabal.configureCommand defaultProgramDb
configureOptions :: ShowOrParseArgs -> [OptionField ConfigFlags]
configureOptions = commandOptions configureCommand
......@@ -518,7 +518,7 @@ buildCommand = parent {
setFst a (_,b) = (a,b)
setSnd b (a,_) = (a,b)
parent = Cabal.buildCommand defaultProgramConfiguration
parent = Cabal.buildCommand defaultProgramDb
instance Monoid BuildExFlags where
mempty = gmempty
......@@ -544,7 +544,7 @@ replCommand = parent {
setFst a (_,b) = (a,b)
setSnd b (a,_) = (a,b)
parent = Cabal.replCommand defaultProgramConfiguration
parent = Cabal.replCommand defaultProgramDb
-- ------------------------------------------------------------
-- * Test command
......@@ -569,7 +569,7 @@ testCommand = parent {
get3 (_,_,c) = c; set3 c (a,b,_) = (a,b,c)
parent = Cabal.testCommand
progConf = defaultProgramConfiguration
progConf = defaultProgramDb
-- ------------------------------------------------------------
-- * Bench command
......@@ -594,7 +594,7 @@ benchmarkCommand = parent {
get3 (_,_,c) = c; set3 c (a,b,_) = (a,b,c)
parent = Cabal.benchmarkCommand
progConf = defaultProgramConfiguration
progConf = defaultProgramDb
-- ------------------------------------------------------------
-- * Fetch command
......@@ -892,7 +892,7 @@ runCommand = CommandUI {
setFst a (_,b) = (a,b)
setSnd b (a,_) = (a,b)
parent = Cabal.buildCommand defaultProgramConfiguration
parent = Cabal.buildCommand defaultProgramDb
-- ------------------------------------------------------------
-- * Report flags
......@@ -1255,7 +1255,7 @@ installCommand = CommandUI {
++ " continue working as long as bindir and datadir are left untouched.",
commandNotes = Just $ \pname ->
( case commandNotes
$ Cabal.configureCommand defaultProgramConfiguration
$ Cabal.configureCommand defaultProgramDb
of Just desc -> desc pname ++ "\n"
Nothing -> ""
)
......
......@@ -148,7 +148,7 @@ import Distribution.Simple.Configure
, ConfigStateFileError(..), localBuildInfoFile
, getPersistBuildConfig, tryGetPersistBuildConfig )
import qualified Distribution.Simple.LocalBuildInfo as LBI
import Distribution.Simple.Program (defaultProgramConfiguration
import Distribution.Simple.Program (defaultProgramDb
,configureAllKnownPrograms
,simpleProgramInvocation
,getProgramInvocationOutput)
......@@ -382,7 +382,7 @@ build verbosity config distPref buildFlags extraArgs =
setupWrapper verbosity setupOptions Nothing
(Cabal.buildCommand progConf) mkBuildFlags extraArgs
where
progConf = defaultProgramConfiguration
progConf = defaultProgramDb
setupOptions = defaultSetupScriptOptions { useDistPref = distPref }
mkBuildFlags version = filterBuildFlags version config buildFlags'
......@@ -432,7 +432,7 @@ replAction (replFlags, buildExFlags) extraArgs globalFlags = do
reconfigure verbosity (replDistPref replFlags)
mempty [] globalFlags noAddSource NoFlag
(const Nothing)
let progConf = defaultProgramConfiguration
let progConf = defaultProgramDb
setupOptions = defaultSetupScriptOptions
{ useCabalVersion = orLaterVersion $ Version [1,18,0] []
, useDistPref = distPref
......
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