Cabal-2.0.0.2: A framework for packaging Haskell software

CopyrightIsaac Jones 2003-2004
Duncan Coutts 2007
LicenseBSD3
Maintainercabal-devel@haskell.org
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Distribution.Simple.Setup

Description

This is a big module, but not very complicated. The code is very regular and repetitive. It defines the command line interface for all the Cabal commands. For each command (like configure, build etc) it defines a type that holds all the flags, the default set of flags and a CommandUI that maps command line flags to and from the corresponding flags type.

All the flags types are instances of Monoid, see http://www.haskell.org/pipermail/cabal-devel/2007-December/001509.html for an explanation.

The types defined here get used in the front end and especially in cabal-install which has to do quite a bit of manipulating sets of command line flags.

This is actually relatively nice, it works quite well. The main change it needs is to unify it with the code for managing sets of fields that can be read and written from files. This would allow us to save configure flags in config files.

Synopsis

Documentation

data GlobalFlags Source #

Flags that apply at the top level, not to any sub-command.

Instances
Generic GlobalFlags Source # 
Instance details

Associated Types

type Rep GlobalFlags :: * -> * #

Semigroup GlobalFlags Source # 
Instance details
Monoid GlobalFlags Source # 
Instance details
type Rep GlobalFlags Source # 
Instance details
type Rep GlobalFlags = D1 * (MetaData "GlobalFlags" "Distribution.Simple.Setup" "Cabal-2.0.0.2-ArD10404PgFe4UBxSAxnL" False) (C1 * (MetaCons "GlobalFlags" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "globalVersion") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) (S1 * (MetaSel (Just Symbol "globalNumericVersion") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool)))))

data ConfigFlags Source #

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

Instances
Eq ConfigFlags Source # 
Instance details
Read ConfigFlags Source # 
Instance details
Show ConfigFlags Source # 
Instance details
Generic ConfigFlags Source # 
Instance details

Associated Types

type Rep ConfigFlags :: * -> * #

Semigroup ConfigFlags Source # 
Instance details
Monoid ConfigFlags Source # 
Instance details
Binary ConfigFlags Source # 
Instance details
type Rep ConfigFlags Source # 
Instance details
type Rep ConfigFlags = D1 * (MetaData "ConfigFlags" "Distribution.Simple.Setup" "Cabal-2.0.0.2-ArD10404PgFe4UBxSAxnL" False) (C1 * (MetaCons "ConfigFlags" PrefixI True) ((:*:) * ((:*:) * ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "configArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [String])) ((:*:) * (S1 * (MetaSel (Just Symbol "configPrograms_") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Last' ProgramDb))) (S1 * (MetaSel (Just Symbol "configProgramPaths") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [(String, FilePath)])))) ((:*:) * (S1 * (MetaSel (Just Symbol "configProgramArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [(String, [String])])) ((:*:) * (S1 * (MetaSel (Just Symbol "configProgramPathExtra") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (NubList FilePath))) (S1 * (MetaSel (Just Symbol "configHcFlavor") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag CompilerFlavor)))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "configHcPath") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag FilePath))) ((:*:) * (S1 * (MetaSel (Just Symbol "configHcPkg") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag FilePath))) (S1 * (MetaSel (Just Symbol "configVanillaLib") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))))) ((:*:) * (S1 * (MetaSel (Just Symbol "configProfLib") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) ((:*:) * (S1 * (MetaSel (Just Symbol "configSharedLib") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) (S1 * (MetaSel (Just Symbol "configDynExe") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))))))) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "configProfExe") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) ((:*:) * (S1 * (MetaSel (Just Symbol "configProf") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) (S1 * (MetaSel (Just Symbol "configProfDetail") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag ProfDetailLevel))))) ((:*:) * (S1 * (MetaSel (Just Symbol "configProfLibDetail") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag ProfDetailLevel))) ((:*:) * (S1 * (MetaSel (Just Symbol "configConfigureArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [String])) (S1 * (MetaSel (Just Symbol "configOptimization") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag OptimisationLevel)))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "configProgPrefix") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag PathTemplate))) ((:*:) * (S1 * (MetaSel (Just Symbol "configProgSuffix") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag PathTemplate))) (S1 * (MetaSel (Just Symbol "configInstallDirs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (InstallDirs (Flag PathTemplate)))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "configScratchDir") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag FilePath))) (S1 * (MetaSel (Just Symbol "configExtraLibDirs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [FilePath]))) ((:*:) * (S1 * (MetaSel (Just Symbol "configExtraFrameworkDirs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [FilePath])) (S1 * (MetaSel (Just Symbol "configExtraIncludeDirs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [FilePath]))))))) ((:*:) * ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "configIPID") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag String))) ((:*:) * (S1 * (MetaSel (Just Symbol "configCID") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag ComponentId))) (S1 * (MetaSel (Just Symbol "configDeterministic") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))))) ((:*:) * (S1 * (MetaSel (Just Symbol "configDistPref") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag FilePath))) ((:*:) * (S1 * (MetaSel (Just Symbol "configCabalFilePath") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag FilePath))) (S1 * (MetaSel (Just Symbol "configVerbosity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Verbosity)))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "configUserInstall") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) ((:*:) * (S1 * (MetaSel (Just Symbol "configPackageDBs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Maybe PackageDB])) (S1 * (MetaSel (Just Symbol "configGHCiLib") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "configSplitObjs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) (S1 * (MetaSel (Just Symbol "configStripExes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool)))) ((:*:) * (S1 * (MetaSel (Just Symbol "configStripLibs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) (S1 * (MetaSel (Just Symbol "configConstraints") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [Dependency])))))) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "configDependencies") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [(PackageName, ComponentId)])) ((:*:) * (S1 * (MetaSel (Just Symbol "configInstantiateWith") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [(ModuleName, Module)])) (S1 * (MetaSel (Just Symbol "configConfigurationsFlags") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * FlagAssignment)))) ((:*:) * (S1 * (MetaSel (Just Symbol "configTests") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) ((:*:) * (S1 * (MetaSel (Just Symbol "configBenchmarks") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) (S1 * (MetaSel (Just Symbol "configCoverage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool)))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "configLibCoverage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) ((:*:) * (S1 * (MetaSel (Just Symbol "configExactConfiguration") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) (S1 * (MetaSel (Just Symbol "configFlagError") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag String))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "configRelocatable") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) (S1 * (MetaSel (Just Symbol "configDebugInfo") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag DebugInfoLevel)))) ((:*:) * (S1 * (MetaSel (Just Symbol "configAllowOlder") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe AllowOlder))) (S1 * (MetaSel (Just Symbol "configAllowNewer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe AllowNewer))))))))))

configPrograms :: WithCallStack (ConfigFlags -> ProgramDb) Source #

More convenient version of configPrograms. Results in an error if internal invariant is violated.

data RelaxDeps Source #

Generic data type for policy when relaxing bounds in dependencies. Don't use this directly: use AllowOlder or AllowNewer depending on whether or not you are relaxing an lower or upper bound (respectively).

Constructors

RelaxDepsNone

Default: honor the upper bounds in all dependencies, never choose versions newer than allowed.

RelaxDepsSome [RelaxedDep]

Ignore upper bounds in dependencies on the given packages.

RelaxDepsAll

Ignore upper bounds in dependencies on all packages.

Instances
Eq RelaxDeps Source # 
Instance details
Read RelaxDeps Source # 
Instance details
Show RelaxDeps Source # 
Instance details
Generic RelaxDeps Source # 
Instance details

Associated Types

type Rep RelaxDeps :: * -> * #

Semigroup RelaxDeps Source # 
Instance details
Monoid RelaxDeps Source # 
Instance details
Binary RelaxDeps Source # 
Instance details
type Rep RelaxDeps Source # 
Instance details
type Rep RelaxDeps = D1 * (MetaData "RelaxDeps" "Distribution.Simple.Setup" "Cabal-2.0.0.2-ArD10404PgFe4UBxSAxnL" False) ((:+:) * (C1 * (MetaCons "RelaxDepsNone" PrefixI False) (U1 *)) ((:+:) * (C1 * (MetaCons "RelaxDepsSome" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [RelaxedDep]))) (C1 * (MetaCons "RelaxDepsAll" PrefixI False) (U1 *))))

data RelaxedDep Source #

Dependencies can be relaxed either for all packages in the install plan, or only for some packages.

Instances
Eq RelaxedDep Source # 
Instance details
Read RelaxedDep Source # 
Instance details
Show RelaxedDep Source # 
Instance details
Generic RelaxedDep Source # 
Instance details

Associated Types

type Rep RelaxedDep :: * -> * #

Binary RelaxedDep Source # 
Instance details
Text RelaxedDep Source # 
Instance details
type Rep RelaxedDep Source # 
Instance details

isRelaxDeps :: RelaxDeps -> Bool Source #

Convert RelaxDeps to a boolean.

newtype AllowNewer Source #

RelaxDeps in the context of upper bounds (i.e. for --allow-newer flag)

Constructors

AllowNewer 
Instances
Eq AllowNewer Source # 
Instance details
Read AllowNewer Source # 
Instance details
Show AllowNewer Source # 
Instance details
Generic AllowNewer Source # 
Instance details

Associated Types

type Rep AllowNewer :: * -> * #

Semigroup AllowNewer Source # 
Instance details
Monoid AllowNewer Source # 
Instance details
Binary AllowNewer Source # 
Instance details
type Rep AllowNewer Source # 
Instance details
type Rep AllowNewer = D1 * (MetaData "AllowNewer" "Distribution.Simple.Setup" "Cabal-2.0.0.2-ArD10404PgFe4UBxSAxnL" True) (C1 * (MetaCons "AllowNewer" PrefixI True) (S1 * (MetaSel (Just Symbol "unAllowNewer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * RelaxDeps)))

newtype AllowOlder Source #

RelaxDeps in the context of lower bounds (i.e. for --allow-older flag)

Constructors

AllowOlder 
Instances
Eq AllowOlder Source # 
Instance details
Read AllowOlder Source # 
Instance details
Show AllowOlder Source # 
Instance details
Generic AllowOlder Source # 
Instance details

Associated Types

type Rep AllowOlder :: * -> * #

Semigroup AllowOlder Source # 
Instance details
Monoid AllowOlder Source # 
Instance details
Binary AllowOlder Source # 
Instance details
type Rep AllowOlder Source # 
Instance details
type Rep AllowOlder = D1 * (MetaData "AllowOlder" "Distribution.Simple.Setup" "Cabal-2.0.0.2-ArD10404PgFe4UBxSAxnL" True) (C1 * (MetaCons "AllowOlder" PrefixI True) (S1 * (MetaSel (Just Symbol "unAllowOlder") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * RelaxDeps)))

data CopyFlags Source #

Flags to copy: (destdir, copy-prefix (backwards compat), verbosity)

Instances
Show CopyFlags Source # 
Instance details
Generic CopyFlags Source # 
Instance details

Associated Types

type Rep CopyFlags :: * -> * #

Semigroup CopyFlags Source # 
Instance details
Monoid CopyFlags Source # 
Instance details
type Rep CopyFlags Source # 
Instance details

data InstallFlags Source #

Flags to install: (package db, verbosity)

Instances
Show InstallFlags Source # 
Instance details
Generic InstallFlags Source # 
Instance details

Associated Types

type Rep InstallFlags :: * -> * #

Semigroup InstallFlags Source # 
Instance details
Monoid InstallFlags Source # 
Instance details
type Rep InstallFlags Source # 
Instance details
type Rep InstallFlags = D1 * (MetaData "InstallFlags" "Distribution.Simple.Setup" "Cabal-2.0.0.2-ArD10404PgFe4UBxSAxnL" False) (C1 * (MetaCons "InstallFlags" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "installPackageDB") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag PackageDB))) (S1 * (MetaSel (Just Symbol "installDistPref") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag FilePath)))) ((:*:) * (S1 * (MetaSel (Just Symbol "installUseWrapper") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) ((:*:) * (S1 * (MetaSel (Just Symbol "installInPlace") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) (S1 * (MetaSel (Just Symbol "installVerbosity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Verbosity)))))))

data DoctestFlags Source #

Instances
Show DoctestFlags Source # 
Instance details
Generic DoctestFlags Source # 
Instance details

Associated Types

type Rep DoctestFlags :: * -> * #

Semigroup DoctestFlags Source # 
Instance details
Monoid DoctestFlags Source # 
Instance details
type Rep DoctestFlags Source # 
Instance details
type Rep DoctestFlags = D1 * (MetaData "DoctestFlags" "Distribution.Simple.Setup" "Cabal-2.0.0.2-ArD10404PgFe4UBxSAxnL" False) (C1 * (MetaCons "DoctestFlags" PrefixI True) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "doctestProgramPaths") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [(String, FilePath)])) (S1 * (MetaSel (Just Symbol "doctestProgramArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [(String, [String])]))) ((:*:) * (S1 * (MetaSel (Just Symbol "doctestDistPref") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag FilePath))) (S1 * (MetaSel (Just Symbol "doctestVerbosity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Verbosity))))))

data HaddockTarget Source #

When we build haddock documentation, there are two cases:

  1. We build haddocks only for the current development version, intended for local use and not for distribution. In this case, we store the generated documentation in distdochtml/name.
  2. We build haddocks for intended for uploading them to hackage. In this case, we need to follow the layout that hackage expects from documentation tarballs, and we might also want to use different flags than for development builds, so in this case we store the generated documentation in distdochtml/id-docs.

Constructors

ForHackage 
ForDevelopment 
Instances
Eq HaddockTarget Source # 
Instance details
Show HaddockTarget Source # 
Instance details
Generic HaddockTarget Source # 
Instance details

Associated Types

type Rep HaddockTarget :: * -> * #

type Rep HaddockTarget Source # 
Instance details
type Rep HaddockTarget = D1 * (MetaData "HaddockTarget" "Distribution.Simple.Setup" "Cabal-2.0.0.2-ArD10404PgFe4UBxSAxnL" False) ((:+:) * (C1 * (MetaCons "ForHackage" PrefixI False) (U1 *)) (C1 * (MetaCons "ForDevelopment" PrefixI False) (U1 *)))

data HaddockFlags Source #

Instances
Show HaddockFlags Source # 
Instance details
Generic HaddockFlags Source # 
Instance details

Associated Types

type Rep HaddockFlags :: * -> * #

Semigroup HaddockFlags Source # 
Instance details
Monoid HaddockFlags Source # 
Instance details
type Rep HaddockFlags Source # 
Instance details
type Rep HaddockFlags = D1 * (MetaData "HaddockFlags" "Distribution.Simple.Setup" "Cabal-2.0.0.2-ArD10404PgFe4UBxSAxnL" False) (C1 * (MetaCons "HaddockFlags" PrefixI True) ((:*:) * ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "haddockProgramPaths") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [(String, FilePath)])) (S1 * (MetaSel (Just Symbol "haddockProgramArgs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * [(String, [String])]))) ((:*:) * (S1 * (MetaSel (Just Symbol "haddockHoogle") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) (S1 * (MetaSel (Just Symbol "haddockHtml") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "haddockHtmlLocation") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag String))) (S1 * (MetaSel (Just Symbol "haddockForHackage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag HaddockTarget)))) ((:*:) * (S1 * (MetaSel (Just Symbol "haddockExecutables") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) ((:*:) * (S1 * (MetaSel (Just Symbol "haddockTestSuites") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) (S1 * (MetaSel (Just Symbol "haddockBenchmarks") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))))))) ((:*:) * ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "haddockForeignLibs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) (S1 * (MetaSel (Just Symbol "haddockInternal") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool)))) ((:*:) * (S1 * (MetaSel (Just Symbol "haddockCss") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag FilePath))) (S1 * (MetaSel (Just Symbol "haddockHscolour") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))))) ((:*:) * ((:*:) * (S1 * (MetaSel (Just Symbol "haddockHscolourCss") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag FilePath))) (S1 * (MetaSel (Just Symbol "haddockContents") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag PathTemplate)))) ((:*:) * (S1 * (MetaSel (Just Symbol "haddockDistPref") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag FilePath))) ((:*:) * (S1 * (MetaSel (Just Symbol "haddockKeepTempFiles") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) (S1 * (MetaSel (Just Symbol "haddockVerbosity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Verbosity)))))))))

data HscolourFlags Source #

Instances
Show HscolourFlags Source # 
Instance details
Generic HscolourFlags Source # 
Instance details

Associated Types

type Rep HscolourFlags :: * -> * #

Semigroup HscolourFlags Source # 
Instance details
Monoid HscolourFlags Source # 
Instance details
type Rep HscolourFlags Source # 
Instance details

data BuildFlags Source #

Instances
Read BuildFlags Source # 
Instance details
Show BuildFlags Source # 
Instance details
Generic BuildFlags Source # 
Instance details

Associated Types

type Rep BuildFlags :: * -> * #

Semigroup BuildFlags Source # 
Instance details
Monoid BuildFlags Source # 
Instance details
type Rep BuildFlags Source # 
Instance details

buildVerbose :: BuildFlags -> Verbosity Source #

Deprecated: Use buildVerbosity instead

data ReplFlags Source #

Instances
Show ReplFlags Source # 
Instance details
Generic ReplFlags Source # 
Instance details

Associated Types

type Rep ReplFlags :: * -> * #

Semigroup ReplFlags Source # 
Instance details
Monoid ReplFlags Source # 
Instance details
type Rep ReplFlags Source # 
Instance details

data CleanFlags Source #

Instances
Show CleanFlags Source # 
Instance details
Generic CleanFlags Source # 
Instance details

Associated Types

type Rep CleanFlags :: * -> * #

Semigroup CleanFlags Source # 
Instance details
Monoid CleanFlags Source # 
Instance details
type Rep CleanFlags Source # 
Instance details
type Rep CleanFlags = D1 * (MetaData "CleanFlags" "Distribution.Simple.Setup" "Cabal-2.0.0.2-ArD10404PgFe4UBxSAxnL" False) (C1 * (MetaCons "CleanFlags" PrefixI True) ((:*:) * (S1 * (MetaSel (Just Symbol "cleanSaveConf") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Bool))) ((:*:) * (S1 * (MetaSel (Just Symbol "cleanDistPref") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag FilePath))) (S1 * (MetaSel (Just Symbol "cleanVerbosity") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Flag Verbosity))))))

data RegisterFlags Source #

Flags to register and unregister: (user package, gen-script, in-place, verbosity)

Instances
Show RegisterFlags Source # 
Instance details
Generic RegisterFlags Source # 
Instance details

Associated Types

type Rep RegisterFlags :: * -> * #

Semigroup RegisterFlags Source # 
Instance details
Monoid RegisterFlags Source # 
Instance details
type Rep RegisterFlags Source # 
Instance details

data SDistFlags Source #

Flags to sdist: (snapshot, verbosity)

Instances
Show SDistFlags Source # 
Instance details
Generic SDistFlags Source # 
Instance details

Associated Types

type Rep SDistFlags :: * -> * #

Semigroup SDistFlags Source # 
Instance details
Monoid SDistFlags Source # 
Instance details
type Rep SDistFlags Source # 
Instance details

data TestFlags Source #

Instances
Generic TestFlags Source # 
Instance details

Associated Types

type Rep TestFlags :: * -> * #

Semigroup TestFlags Source # 
Instance details
Monoid TestFlags Source # 
Instance details
type Rep TestFlags Source # 
Instance details

data TestShowDetails Source #

Instances
Bounded TestShowDetails Source # 
Instance details
Enum TestShowDetails Source # 
Instance details
Eq TestShowDetails Source # 
Instance details
Ord TestShowDetails Source # 
Instance details
Show TestShowDetails Source # 
Instance details
Semigroup TestShowDetails Source # 
Instance details
Monoid TestShowDetails Source # 
Instance details
Text TestShowDetails Source # 
Instance details

data CopyDest Source #

The location prefix for the copy command.

Constructors

NoCopyDest 
CopyTo FilePath 
Instances
Eq CopyDest Source # 
Instance details
Show CopyDest Source # 
Instance details

configureArgs :: Bool -> ConfigFlags -> [String] Source #

Arguments to pass to a configure script, e.g. generated by autoconf.

programDbOptions :: ProgramDb -> ShowOrParseArgs -> (flags -> [(String, [String])]) -> ([(String, [String])] -> flags -> flags) -> [OptionField flags] Source #

For each known program PROG in progDb, produce a PROG-options OptionField.

programDbPaths' :: (String -> String) -> ProgramDb -> ShowOrParseArgs -> (flags -> [(String, FilePath)]) -> ([(String, FilePath)] -> flags -> flags) -> [OptionField flags] Source #

Like programDbPaths, but allows to customise the option name.

programConfigurationOptions :: ProgramDb -> ShowOrParseArgs -> (flags -> [(String, [String])]) -> ([(String, [String])] -> flags -> flags) -> [OptionField flags] Source #

Deprecated: Use programDbOptions instead

For each known program PROG in progDb, produce a PROG-options OptionField.

programConfigurationPaths' :: (String -> String) -> ProgramDb -> ShowOrParseArgs -> (flags -> [(String, FilePath)]) -> ([(String, FilePath)] -> flags -> flags) -> [OptionField flags] Source #

Deprecated: Use programDbPaths' instead

Like programDbPaths, but allows to customise the option name.

splitArgs :: String -> [String] Source #

Helper function to split a string into a list of arguments. It's supposed to handle quoted things sensibly, eg:

splitArgs "--foo=\"C:/Program Files/Bar/" --baz"
  = ["--foo=C:/Program Files/Bar", "--baz"]
splitArgs "\"-DMSGSTR=\\\"foo bar\\\"\" --baz"
  = ["-DMSGSTR=\"foo bar\"","--baz"]

optionDistPref :: (flags -> Flag FilePath) -> (Flag FilePath -> flags -> flags) -> ShowOrParseArgs -> OptionField flags Source #

data Flag a Source #

All flags are monoids, they come in two flavours:

  1. list flags eg
--ghc-option=foo --ghc-option=bar

gives us all the values ["foo", "bar"]

  1. singular value flags, eg:
--enable-foo --disable-foo

gives us Just False So this Flag type is for the latter singular kind of flag. Its monoid instance gives us the behaviour where it starts out as NoFlag and later flags override earlier ones.

Constructors

Flag a 
NoFlag 
Instances
Functor Flag Source # 
Instance details

Methods

fmap :: (a -> b) -> Flag a -> Flag b #

(<$) :: a -> Flag b -> Flag a #

Bounded a => Bounded (Flag a) Source # 
Instance details

Methods

minBound :: Flag a #

maxBound :: Flag a #

Enum a => Enum (Flag a) Source # 
Instance details

Methods

succ :: Flag a -> Flag a #

pred :: Flag a -> Flag a #

toEnum :: Int -> Flag a #

fromEnum :: Flag a -> Int #

enumFrom :: Flag a -> [Flag a] #

enumFromThen :: Flag a -> Flag a -> [Flag a] #

enumFromTo :: Flag a -> Flag a -> [Flag a] #

enumFromThenTo :: Flag a -> Flag a -> Flag a -> [Flag a] #

Eq a => Eq (Flag a) Source # 
Instance details

Methods

(==) :: Flag a -> Flag a -> Bool #

(/=) :: Flag a -> Flag a -> Bool #

Read a => Read (Flag a) Source # 
Instance details
Show a => Show (Flag a) Source # 
Instance details

Methods

showsPrec :: Int -> Flag a -> ShowS #

show :: Flag a -> String #

showList :: [Flag a] -> ShowS #

Generic (Flag a) Source # 
Instance details

Associated Types

type Rep (Flag a) :: * -> * #

Methods

from :: Flag a -> Rep (Flag a) x #

to :: Rep (Flag a) x -> Flag a #

Semigroup (Flag a) Source # 
Instance details

Methods

(<>) :: Flag a -> Flag a -> Flag a #

sconcat :: NonEmpty (Flag a) -> Flag a #

stimes :: Integral b => b -> Flag a -> Flag a #

Monoid (Flag a) Source # 
Instance details

Methods

mempty :: Flag a #

mappend :: Flag a -> Flag a -> Flag a #

mconcat :: [Flag a] -> Flag a #

Binary a => Binary (Flag a) Source # 
Instance details

Methods

put :: Flag a -> Put #

get :: Get (Flag a) #

putList :: [Flag a] -> Put #

type Rep (Flag a) Source # 
Instance details
type Rep (Flag a) = D1 * (MetaData "Flag" "Distribution.Simple.Setup" "Cabal-2.0.0.2-ArD10404PgFe4UBxSAxnL" False) ((:+:) * (C1 * (MetaCons "Flag" PrefixI False) (S1 * (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * a))) (C1 * (MetaCons "NoFlag" PrefixI False) (U1 *)))

toFlag :: a -> Flag a Source #

flagToList :: Flag a -> [a] Source #

class BooleanFlag a where Source #

Types that represent boolean flags.

Minimal complete definition

asBool

Methods

asBool :: a -> Bool Source #

Instances
BooleanFlag Bool Source # 
Instance details

Methods

asBool :: Bool -> Bool Source #

boolOpt :: SFlags -> SFlags -> MkOptDescr (a -> Flag Bool) (Flag Bool -> a -> a) a Source #

boolOpt' :: OptFlags -> OptFlags -> MkOptDescr (a -> Flag Bool) (Flag Bool -> a -> a) a Source #

trueArg :: MkOptDescr (a -> Flag Bool) (Flag Bool -> a -> a) a Source #

falseArg :: MkOptDescr (a -> Flag Bool) (Flag Bool -> a -> a) a Source #

optionVerbosity :: (flags -> Flag Verbosity) -> (Flag Verbosity -> flags -> flags) -> OptionField flags Source #

optionNumJobs :: (flags -> Flag (Maybe Int)) -> (Flag (Maybe Int) -> flags -> flags) -> OptionField flags Source #