Copyright | (c) David Himmelstrup 2005 |
---|---|
License | BSD-like |
Maintainer | lemmih@gmail.com |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
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 ConfigFlags = ConfigFlags {
- configArgs :: [String]
- 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
- 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 :: [FilePath]
- configExtraLibDirsStatic :: [FilePath]
- configExtraFrameworkDirs :: [FilePath]
- configExtraIncludeDirs :: [FilePath]
- configIPID :: Flag String
- configCID :: Flag ComponentId
- configDeterministic :: Flag Bool
- configDistPref :: Flag FilePath
- configCabalFilePath :: Flag FilePath
- configVerbosity :: Flag Verbosity
- 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]
- 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
- configureOptions :: ShowOrParseArgs -> [OptionField ConfigFlags]
- 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 = BuildFlags {
- buildProgramPaths :: [(String, FilePath)]
- buildProgramArgs :: [(String, [String])]
- buildDistPref :: Flag FilePath
- buildVerbosity :: Flag Verbosity
- buildNumJobs :: Flag (Maybe Int)
- buildArgs :: [String]
- buildCabalFilePath :: Flag FilePath
- 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
- 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)
- 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
- 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
- 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 (Flag Verbosity)
- 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.
GlobalFlags | |
|
Instances
data RepoContext Source #
Access to repositories
RepoContext | |
|
withRepoContext :: Verbosity -> GlobalFlags -> (RepoContext -> IO a) -> IO a Source #
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
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
Instances
data BuildFlags #
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.
Instances
filterHaddockFlags :: HaddockFlags -> Version -> HaddockFlags Source #
ListFlags | |
|
Instances
listNeedsCompiler :: ListFlags -> Bool Source #
data UpdateFlags Source #
Instances
Generic UpdateFlags Source # | |
Defined in Distribution.Client.Setup type Rep UpdateFlags :: Type -> Type # from :: UpdateFlags -> Rep UpdateFlags x # to :: Rep UpdateFlags x -> UpdateFlags # | |
type Rep UpdateFlags Source # | |
Defined in Distribution.Client.Setup type Rep UpdateFlags = D1 ('MetaData "UpdateFlags" "Distribution.Client.Setup" "cabal-install-3.8.1.0-7iNu5HGLMqL9QLfLAUJqbd" '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)))) |
Instances
Generic InfoFlags Source # | |
Semigroup InfoFlags Source # | |
Monoid InfoFlags Source # | |
type Rep InfoFlags Source # | |
Defined in Distribution.Client.Setup type Rep InfoFlags = D1 ('MetaData "InfoFlags" "Distribution.Client.Setup" "cabal-install-3.8.1.0-7iNu5HGLMqL9QLfLAUJqbd" '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 #
data FreezeFlags Source #
Instances
data UploadFlags Source #
Instances
data IsCandidate Source #
Is this a candidate package or a package to be published?
Instances
Eq IsCandidate Source # | |
Defined in Distribution.Client.Setup (==) :: IsCandidate -> IsCandidate -> Bool # (/=) :: IsCandidate -> IsCandidate -> Bool # |
data ReportFlags Source #
Instances
InitFlags is a subset of flags available in the
.cabal
file that represent options that are relevant to the
init command process.
InitFlags | |
|
Instances
data ActAsSetupFlags Source #
Instances
data UserConfigFlags Source #
Instances
liftOptions :: (b -> a) -> (a -> b -> b) -> [OptionField a] -> [OptionField b] Source #
yesNoOpt :: ShowOrParseArgs -> MkOptDescr (b -> Flag Bool) (Flag Bool -> b -> b) b Source #