Copyright | (c) David Himmelstrup 2005 |
---|---|
License | BSD-like |
Maintainer | [email protected] |
Stability | provisional |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Distribution.Client.Setup
Description
Synopsis
- globalCommand :: [Command action] -> CommandUI GlobalFlags
- data GlobalFlags = GlobalFlags {
- globalVersion :: Flag Bool
- globalNumericVersion :: Flag Bool
- globalConfigFile :: Flag FilePath
- globalConstraintsFile :: Flag FilePath
- globalRemoteRepos :: NubList RemoteRepo
- globalCacheDir :: Flag FilePath
- globalLocalNoIndexRepos :: NubList LocalRepo
- globalActiveRepos :: Flag ActiveRepos
- globalLogsDir :: Flag FilePath
- globalIgnoreExpiry :: Flag Bool
- globalHttpTransport :: Flag String
- globalNix :: Flag Bool
- globalStoreDir :: Flag FilePath
- globalProgPathExtra :: NubList FilePath
- defaultGlobalFlags :: GlobalFlags
- data RepoContext = RepoContext {
- repoContextRepos :: [Repo]
- repoContextGetTransport :: IO HttpTransport
- repoContextWithSecureRepo :: forall a. Repo -> (forall down. Repository down -> IO a) -> IO a
- repoContextIgnoreExpiry :: Bool
- withRepoContext :: Verbosity -> GlobalFlags -> (RepoContext -> IO a) -> IO a
- configureCommand :: CommandUI ConfigFlags
- data CommonSetupFlags = CommonSetupFlags {
- setupVerbosity :: !(Flag Verbosity)
- setupWorkingDir :: !(Flag (SymbolicPath CWD ('Dir Pkg)))
- setupDistPref :: !(Flag (SymbolicPath Pkg ('Dir Dist)))
- setupCabalFilePath :: !(Flag (SymbolicPath Pkg 'File))
- setupTargets :: [String]
- data ConfigFlags where
- ConfigFlags {
- configCommonFlags :: !CommonSetupFlags
- configPrograms_ :: Option' (Last' ProgramDb)
- configProgramPaths :: [(String, FilePath)]
- configProgramArgs :: [(String, [String])]
- configProgramPathExtra :: NubList FilePath
- configHcFlavor :: Flag CompilerFlavor
- configHcPath :: Flag FilePath
- configHcPkg :: Flag FilePath
- configVanillaLib :: Flag Bool
- configProfLib :: Flag Bool
- configSharedLib :: Flag Bool
- configStaticLib :: Flag Bool
- configDynExe :: Flag Bool
- configFullyStaticExe :: Flag Bool
- configProfExe :: Flag Bool
- configProf :: Flag Bool
- configProfShared :: Flag Bool
- configProfDetail :: Flag ProfDetailLevel
- configProfLibDetail :: Flag ProfDetailLevel
- configConfigureArgs :: [String]
- configOptimization :: Flag OptimisationLevel
- configProgPrefix :: Flag PathTemplate
- configProgSuffix :: Flag PathTemplate
- configInstallDirs :: InstallDirs (Flag PathTemplate)
- configScratchDir :: Flag FilePath
- configExtraLibDirs :: [SymbolicPath Pkg ('Dir Lib)]
- configExtraLibDirsStatic :: [SymbolicPath Pkg ('Dir Lib)]
- configExtraFrameworkDirs :: [SymbolicPath Pkg ('Dir Framework)]
- configExtraIncludeDirs :: [SymbolicPath Pkg ('Dir Include)]
- configIPID :: Flag String
- configCID :: Flag ComponentId
- configDeterministic :: Flag Bool
- configUserInstall :: Flag Bool
- configPackageDBs :: [Maybe PackageDB]
- configGHCiLib :: Flag Bool
- configSplitSections :: Flag Bool
- configSplitObjs :: Flag Bool
- configStripExes :: Flag Bool
- configStripLibs :: Flag Bool
- configConstraints :: [PackageVersionConstraint]
- configDependencies :: [GivenComponent]
- configPromisedDependencies :: [PromisedComponent]
- configInstantiateWith :: [(ModuleName, Module)]
- configConfigurationsFlags :: FlagAssignment
- configTests :: Flag Bool
- configBenchmarks :: Flag Bool
- configCoverage :: Flag Bool
- configLibCoverage :: Flag Bool
- configExactConfiguration :: Flag Bool
- configFlagError :: Flag String
- configRelocatable :: Flag Bool
- configDebugInfo :: Flag DebugInfoLevel
- configDumpBuildInfo :: Flag DumpBuildInfo
- configUseResponseFiles :: Flag Bool
- configAllowDependingOnPrivateLibs :: Flag Bool
- configCoverageFor :: Flag [UnitId]
- configIgnoreBuildTools :: Flag Bool
- pattern ConfigCommonFlags :: Flag Verbosity -> Flag (SymbolicPath Pkg ('Dir Dist)) -> Flag (SymbolicPath CWD ('Dir Pkg)) -> Flag (SymbolicPath Pkg 'File) -> [String] -> ConfigFlags
- ConfigFlags {
- configureOptions :: ShowOrParseArgs -> [OptionField ConfigFlags]
- filterCommonFlags :: CommonSetupFlags -> Version -> CommonSetupFlags
- filterConfigureFlags :: ConfigFlags -> Version -> ConfigFlags
- configPackageDB' :: ConfigFlags -> PackageDBStack
- configCompilerAux' :: ConfigFlags -> IO (Compiler, Platform, ProgramDb)
- configureExCommand :: CommandUI (ConfigFlags, ConfigExFlags)
- data ConfigExFlags = ConfigExFlags {
- configCabalVersion :: Flag Version
- configAppend :: Flag Bool
- configBackup :: Flag Bool
- configExConstraints :: [(UserConstraint, ConstraintSource)]
- configPreferences :: [PackageVersionConstraint]
- configSolver :: Flag PreSolver
- configAllowNewer :: Maybe AllowNewer
- configAllowOlder :: Maybe AllowOlder
- configWriteGhcEnvironmentFilesPolicy :: Flag WriteGhcEnvironmentFilesPolicy
- defaultConfigExFlags :: ConfigExFlags
- buildCommand :: CommandUI BuildFlags
- data BuildFlags where
- BuildFlags {
- buildCommonFlags :: !CommonSetupFlags
- buildProgramPaths :: [(String, FilePath)]
- buildProgramArgs :: [(String, [String])]
- buildNumJobs :: Flag (Maybe Int)
- buildUseSemaphore :: Flag String
- pattern BuildCommonFlags :: Flag Verbosity -> Flag (SymbolicPath Pkg ('Dir Dist)) -> Flag (SymbolicPath CWD ('Dir Pkg)) -> Flag (SymbolicPath Pkg 'File) -> [String] -> BuildFlags
- BuildFlags {
- filterTestFlags :: TestFlags -> Version -> TestFlags
- replCommand :: CommandUI ReplFlags
- testCommand :: CommandUI (BuildFlags, TestFlags)
- benchmarkCommand :: CommandUI (BuildFlags, BenchmarkFlags)
- testOptions :: ShowOrParseArgs -> [OptionField TestFlags]
- benchmarkOptions :: ShowOrParseArgs -> [OptionField BenchmarkFlags]
- configureExOptions :: ShowOrParseArgs -> ConstraintSource -> [OptionField ConfigExFlags]
- reconfigureCommand :: CommandUI (ConfigFlags, ConfigExFlags)
- installCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags, BenchmarkFlags)
- data InstallFlags = InstallFlags {
- installDocumentation :: Flag Bool
- installHaddockIndex :: Flag PathTemplate
- installDest :: Flag CopyDest
- installDryRun :: Flag Bool
- installOnlyDownload :: Flag Bool
- installMaxBackjumps :: Flag Int
- installReorderGoals :: Flag ReorderGoals
- installCountConflicts :: Flag CountConflicts
- installFineGrainedConflicts :: Flag FineGrainedConflicts
- installMinimizeConflictSet :: Flag MinimizeConflictSet
- installIndependentGoals :: Flag IndependentGoals
- installPreferOldest :: Flag PreferOldest
- installShadowPkgs :: Flag ShadowPkgs
- installStrongFlags :: Flag StrongFlags
- installAllowBootLibInstalls :: Flag AllowBootLibInstalls
- installOnlyConstrained :: Flag OnlyConstrained
- installReinstall :: Flag Bool
- installAvoidReinstalls :: Flag AvoidReinstalls
- installOverrideReinstall :: Flag Bool
- installUpgradeDeps :: Flag Bool
- installOnly :: Flag Bool
- installOnlyDeps :: Flag Bool
- installIndexState :: Flag TotalIndexState
- installRootCmd :: Flag String
- installSummaryFile :: NubList PathTemplate
- installLogFile :: Flag PathTemplate
- installBuildReports :: Flag ReportLevel
- installReportPlanningFailure :: Flag Bool
- installSymlinkBinDir :: Flag FilePath
- installPerComponent :: Flag Bool
- installNumJobs :: Flag (Maybe Int)
- installUseSemaphore :: Flag Bool
- installKeepGoing :: Flag Bool
- installRunTests :: Flag Bool
- installOfflineMode :: Flag Bool
- installOptions :: ShowOrParseArgs -> [OptionField InstallFlags]
- defaultInstallFlags :: InstallFlags
- filterHaddockArgs :: [String] -> Version -> [String]
- filterHaddockFlags :: HaddockFlags -> Version -> HaddockFlags
- haddockOptions :: ShowOrParseArgs -> [OptionField HaddockFlags]
- defaultSolver :: PreSolver
- defaultMaxBackjumps :: Int
- listCommand :: CommandUI ListFlags
- data ListFlags = ListFlags {}
- listNeedsCompiler :: ListFlags -> Bool
- data UpdateFlags = UpdateFlags {}
- defaultUpdateFlags :: UpdateFlags
- infoCommand :: CommandUI InfoFlags
- data InfoFlags = InfoFlags {}
- fetchCommand :: CommandUI FetchFlags
- data FetchFlags = FetchFlags {
- fetchDeps :: Flag Bool
- fetchDryRun :: Flag Bool
- fetchSolver :: Flag PreSolver
- fetchMaxBackjumps :: Flag Int
- fetchReorderGoals :: Flag ReorderGoals
- fetchCountConflicts :: Flag CountConflicts
- fetchFineGrainedConflicts :: Flag FineGrainedConflicts
- fetchMinimizeConflictSet :: Flag MinimizeConflictSet
- fetchIndependentGoals :: Flag IndependentGoals
- fetchPreferOldest :: Flag PreferOldest
- fetchShadowPkgs :: Flag ShadowPkgs
- fetchStrongFlags :: Flag StrongFlags
- fetchAllowBootLibInstalls :: Flag AllowBootLibInstalls
- fetchOnlyConstrained :: Flag OnlyConstrained
- fetchTests :: Flag Bool
- fetchBenchmarks :: Flag Bool
- fetchVerbosity :: Flag Verbosity
- freezeCommand :: CommandUI FreezeFlags
- data FreezeFlags = FreezeFlags {
- freezeDryRun :: Flag Bool
- freezeTests :: Flag Bool
- freezeBenchmarks :: Flag Bool
- freezeSolver :: Flag PreSolver
- freezeMaxBackjumps :: Flag Int
- freezeReorderGoals :: Flag ReorderGoals
- freezeCountConflicts :: Flag CountConflicts
- freezeFineGrainedConflicts :: Flag FineGrainedConflicts
- freezeMinimizeConflictSet :: Flag MinimizeConflictSet
- freezeIndependentGoals :: Flag IndependentGoals
- freezePreferOldest :: Flag PreferOldest
- freezeShadowPkgs :: Flag ShadowPkgs
- freezeStrongFlags :: Flag StrongFlags
- freezeAllowBootLibInstalls :: Flag AllowBootLibInstalls
- freezeOnlyConstrained :: Flag OnlyConstrained
- freezeVerbosity :: Flag Verbosity
- genBoundsCommand :: CommandUI FreezeFlags
- getCommand :: CommandUI GetFlags
- unpackCommand :: CommandUI GetFlags
- data GetFlags = GetFlags {}
- checkCommand :: CommandUI CheckFlags
- data CheckFlags = CheckFlags {}
- formatCommand :: CommandUI (Flag Verbosity)
- uploadCommand :: CommandUI UploadFlags
- data UploadFlags = UploadFlags {}
- data IsCandidate
- reportCommand :: CommandUI ReportFlags
- data ReportFlags = ReportFlags {}
- runCommand :: CommandUI BuildFlags
- initCommand :: CommandUI InitFlags
- initOptions :: ShowOrParseArgs -> [OptionField InitFlags]
- data InitFlags = InitFlags {
- interactive :: Flag Bool
- quiet :: Flag Bool
- packageDir :: Flag FilePath
- noComments :: Flag Bool
- minimal :: Flag Bool
- simpleProject :: Flag Bool
- packageName :: Flag PackageName
- version :: Flag Version
- cabalVersion :: Flag CabalSpecVersion
- license :: Flag SpecLicense
- author :: Flag String
- email :: Flag String
- homepage :: Flag String
- synopsis :: Flag String
- category :: Flag String
- extraSrc :: Flag [String]
- extraDoc :: Flag [String]
- packageType :: Flag PackageType
- mainIs :: Flag FilePath
- language :: Flag Language
- exposedModules :: Flag [ModuleName]
- otherModules :: Flag [ModuleName]
- otherExts :: Flag [Extension]
- dependencies :: Flag [Dependency]
- applicationDirs :: Flag [String]
- sourceDirs :: Flag [String]
- buildTools :: Flag [String]
- initializeTestSuite :: Flag Bool
- testDirs :: Flag [String]
- initHcPath :: Flag FilePath
- initVerbosity :: Flag Verbosity
- overwrite :: Flag Bool
- actAsSetupCommand :: CommandUI ActAsSetupFlags
- data ActAsSetupFlags = ActAsSetupFlags {}
- userConfigCommand :: CommandUI UserConfigFlags
- data UserConfigFlags = UserConfigFlags {}
- manpageCommand :: CommandUI ManpageFlags
- haddockCommand :: CommandUI HaddockFlags
- cleanCommand :: CommandUI CleanFlags
- copyCommand :: CommandUI CopyFlags
- registerCommand :: CommandUI RegisterFlags
- liftOptions :: (b -> a) -> (a -> b -> b) -> [OptionField a] -> [OptionField b]
- yesNoOpt :: ShowOrParseArgs -> MkOptDescr (b -> Flag Bool) (Flag Bool -> b -> b) b
Documentation
globalCommand :: [Command action] -> CommandUI GlobalFlags Source #
data GlobalFlags Source #
Flags that apply at the top level, not to any sub-command.
Constructors
GlobalFlags | |
Fields
|
Instances
data RepoContext Source #
Access to repositories
Constructors
RepoContext | |
Fields
|
withRepoContext :: Verbosity -> GlobalFlags -> (RepoContext -> IO a) -> IO a Source #
data CommonSetupFlags #
A datatype that stores common flags for different invocations
of a Setup
executable, e.g. configure, build, install.
Constructors
CommonSetupFlags | |
Fields
|
Instances
data ConfigFlags #
Flags to configure
command.
IMPORTANT: every time a new flag is added, filterConfigureFlags
should be updated.
IMPORTANT: every time a new flag is added, it should be added to the Eq instance
Constructors
ConfigFlags | |
Fields
|
Bundled Patterns
pattern ConfigCommonFlags :: Flag Verbosity -> Flag (SymbolicPath Pkg ('Dir Dist)) -> Flag (SymbolicPath CWD ('Dir Pkg)) -> Flag (SymbolicPath Pkg 'File) -> [String] -> ConfigFlags |
Instances
filterConfigureFlags :: ConfigFlags -> Version -> ConfigFlags Source #
Given some ConfigFlags
for the version of Cabal that
cabal-install was built with, and a target older Version
of
Cabal that we want to pass these flags to, convert the
flags into a form that will be accepted by the older
Setup script. Generally speaking, this just means filtering
out flags that the old Cabal library doesn't understand, but
in some cases it may also mean "emulating" a feature using
some more legacy flags.
configPackageDB' :: ConfigFlags -> PackageDBStack Source #
Get the package database settings from ConfigFlags
, accounting for
--package-db
and --user
flags.
configCompilerAux' :: ConfigFlags -> IO (Compiler, Platform, ProgramDb) Source #
Configure the compiler, but reduce verbosity during this step.
data ConfigExFlags Source #
cabal configure takes some extra flags beyond runghc Setup configure
Constructors
Instances
data BuildFlags #
Constructors
BuildFlags | |
Fields
|
Bundled Patterns
pattern BuildCommonFlags :: Flag Verbosity -> Flag (SymbolicPath Pkg ('Dir Dist)) -> Flag (SymbolicPath CWD ('Dir Pkg)) -> Flag (SymbolicPath Pkg 'File) -> [String] -> BuildFlags |
Instances
filterTestFlags :: TestFlags -> Version -> TestFlags Source #
Given some TestFlags
for the version of Cabal that
cabal-install was built with, and a target older Version
of
Cabal that we want to pass these flags to, convert the
flags into a form that will be accepted by the older
Setup script. Generally speaking, this just means filtering
out flags that the old Cabal library doesn't understand, but
in some cases it may also mean "emulating" a feature using
some more legacy flags.
installCommand :: CommandUI (ConfigFlags, ConfigExFlags, InstallFlags, HaddockFlags, TestFlags, BenchmarkFlags) Source #
data InstallFlags Source #
Install takes the same flags as configure along with a few extras.
Constructors
Instances
filterHaddockFlags :: HaddockFlags -> Version -> HaddockFlags Source #
Constructors
ListFlags | |
Fields
|
Instances
listNeedsCompiler :: ListFlags -> Bool Source #
data UpdateFlags Source #
Constructors
UpdateFlags | |
Fields |
Instances
Generic UpdateFlags Source # | |
Defined in Distribution.Client.Setup Associated Types type Rep UpdateFlags :: Type -> Type # | |
type Rep UpdateFlags Source # | |
Defined in Distribution.Client.Setup type Rep UpdateFlags = D1 ('MetaData "UpdateFlags" "Distribution.Client.Setup" "cabal-install-3.14.2.0-6uCrb2WuMbe9XikRFfughF" 'False) (C1 ('MetaCons "UpdateFlags" 'PrefixI 'True) (S1 ('MetaSel ('Just "updateVerbosity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Verbosity)) :*: S1 ('MetaSel ('Just "updateIndexState") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag TotalIndexState)))) |
Constructors
InfoFlags | |
Fields |
Instances
Monoid InfoFlags Source # | |
Semigroup InfoFlags Source # | |
Generic InfoFlags Source # | |
type Rep InfoFlags Source # | |
Defined in Distribution.Client.Setup type Rep InfoFlags = D1 ('MetaData "InfoFlags" "Distribution.Client.Setup" "cabal-install-3.14.2.0-6uCrb2WuMbe9XikRFfughF" 'False) (C1 ('MetaCons "InfoFlags" 'PrefixI 'True) (S1 ('MetaSel ('Just "infoVerbosity") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Flag Verbosity)) :*: S1 ('MetaSel ('Just "infoPackageDBs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Maybe PackageDB]))) |
data FetchFlags Source #
Constructors
data FreezeFlags Source #
Constructors
Constructors
GetFlags | |
Fields |
Instances
data CheckFlags Source #
Constructors
CheckFlags | |
Fields |
Instances
Show CheckFlags Source # | |
Defined in Distribution.Client.Setup Methods showsPrec :: Int -> CheckFlags -> ShowS # show :: CheckFlags -> String # showList :: [CheckFlags] -> ShowS # |
data UploadFlags Source #
Constructors
UploadFlags | |
Fields |
Instances
data IsCandidate Source #
Is this a candidate package or a package to be published?
Constructors
IsCandidate | |
IsPublished |
Instances
Eq IsCandidate Source # | |
Defined in Distribution.Client.Setup |
data ReportFlags Source #
Constructors
ReportFlags | |
Fields |
Instances
InitFlags is a subset of flags available in the
.cabal
file that represent options that are relevant to the
init command process.
Constructors
InitFlags | |
Fields
|
Instances
data ActAsSetupFlags Source #
Constructors
ActAsSetupFlags | |
Fields |
Instances
data UserConfigFlags Source #
Constructors
UserConfigFlags | |
Fields |
Instances
liftOptions :: (b -> a) -> (a -> b -> b) -> [OptionField a] -> [OptionField b] Source #
yesNoOpt :: ShowOrParseArgs -> MkOptDescr (b -> Flag Bool) (Flag Bool -> b -> b) b Source #