Cabal-3.2.1.0: A framework for packaging Haskell software
Copyright Isaac Jones 2003-2004
Duncan Coutts 2007
License BSD3
Maintainer cabal-devel@haskell.org
Portability portable
Safe Haskell None
Language Haskell2010

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 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

Instances details
Eq ConfigFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Read ConfigFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Show ConfigFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Generic ConfigFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup ConfigFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid ConfigFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Binary ConfigFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Structured ConfigFlags Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep ConfigFlags Source #
Instance details

Defined in Distribution.Simple.Setup

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

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

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

data CopyFlags Source #

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

Instances

Instances details
Show CopyFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Generic CopyFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup CopyFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid CopyFlags Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep CopyFlags Source #
Instance details

Defined in Distribution.Simple.Setup

data InstallFlags Source #

Flags to install : (package db, verbosity)

Instances

Instances details
Show InstallFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Generic InstallFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup InstallFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid InstallFlags Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep InstallFlags Source #
Instance details

Defined in Distribution.Simple.Setup

data DoctestFlags Source #

Instances

Instances details
Show DoctestFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Generic DoctestFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup DoctestFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid DoctestFlags Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep DoctestFlags Source #
Instance details

Defined in Distribution.Simple.Setup

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 dist doc html/ 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 dist doc html/ id -docs .

Instances

Instances details
Eq HaddockTarget Source #
Instance details

Defined in Distribution.Simple.Setup

Show HaddockTarget Source #
Instance details

Defined in Distribution.Simple.Setup

Generic HaddockTarget Source #
Instance details

Defined in Distribution.Simple.Setup

Binary HaddockTarget Source #
Instance details

Defined in Distribution.Simple.Setup

Structured HaddockTarget Source #
Instance details

Defined in Distribution.Simple.Setup

Pretty HaddockTarget Source #
Instance details

Defined in Distribution.Simple.Setup

Parsec HaddockTarget Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep HaddockTarget Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep HaddockTarget = D1 (' MetaData "HaddockTarget" "Distribution.Simple.Setup" "Cabal-3.2.1.0-3w1fQQbNnuQ5xlFGwVXcPy" ' False ) ( C1 (' MetaCons "ForHackage" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "ForDevelopment" ' PrefixI ' False ) ( U1 :: Type -> Type ))

data HaddockFlags Source #

Instances

Instances details
Show HaddockFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Generic HaddockFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup HaddockFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid HaddockFlags Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep HaddockFlags Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep HaddockFlags = D1 (' MetaData "HaddockFlags" "Distribution.Simple.Setup" "Cabal-3.2.1.0-3w1fQQbNnuQ5xlFGwVXcPy" ' False ) ( C1 (' MetaCons "HaddockFlags" ' PrefixI ' True ) (((( S1 (' MetaSel (' Just "haddockProgramPaths") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [( String , FilePath )]) :*: S1 (' MetaSel (' Just "haddockProgramArgs") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [( String , [ String ])])) :*: ( S1 (' MetaSel (' Just "haddockHoogle") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag Bool )) :*: ( S1 (' MetaSel (' Just "haddockHtml") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag Bool )) :*: S1 (' MetaSel (' Just "haddockHtmlLocation") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag String ))))) :*: (( S1 (' MetaSel (' Just "haddockForHackage") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag HaddockTarget )) :*: S1 (' MetaSel (' Just "haddockExecutables") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag Bool ))) :*: ( S1 (' MetaSel (' Just "haddockTestSuites") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag Bool )) :*: ( S1 (' MetaSel (' Just "haddockBenchmarks") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag Bool )) :*: S1 (' MetaSel (' Just "haddockForeignLibs") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag Bool )))))) :*: ((( S1 (' MetaSel (' Just "haddockInternal") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag Bool )) :*: S1 (' MetaSel (' Just "haddockCss") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag FilePath ))) :*: ( S1 (' MetaSel (' Just "haddockLinkedSource") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag Bool )) :*: ( S1 (' MetaSel (' Just "haddockQuickJump") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag Bool )) :*: S1 (' MetaSel (' Just "haddockHscolourCss") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag FilePath ))))) :*: (( S1 (' MetaSel (' Just "haddockContents") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag PathTemplate )) :*: ( S1 (' MetaSel (' Just "haddockDistPref") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag FilePath )) :*: S1 (' MetaSel (' Just "haddockKeepTempFiles") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag Bool )))) :*: ( S1 (' MetaSel (' Just "haddockVerbosity") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag Verbosity )) :*: ( S1 (' MetaSel (' Just "haddockCabalFilePath") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 ( Flag FilePath )) :*: S1 (' MetaSel (' Just "haddockArgs") ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 [ String ])))))))

data HscolourFlags Source #

Instances

Instances details
Show HscolourFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Generic HscolourFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup HscolourFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid HscolourFlags Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep HscolourFlags Source #
Instance details

Defined in Distribution.Simple.Setup

data BuildFlags Source #

Instances

Instances details
Read BuildFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Show BuildFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Generic BuildFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup BuildFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid BuildFlags Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep BuildFlags Source #
Instance details

Defined in Distribution.Simple.Setup

data ReplFlags Source #

Instances

Instances details
Show ReplFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Generic ReplFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup ReplFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid ReplFlags Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep ReplFlags Source #
Instance details

Defined in Distribution.Simple.Setup

data CleanFlags Source #

Instances

Instances details
Show CleanFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Generic CleanFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup CleanFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid CleanFlags Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep CleanFlags Source #
Instance details

Defined in Distribution.Simple.Setup

data RegisterFlags Source #

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

Instances

Instances details
Show RegisterFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Generic RegisterFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup RegisterFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid RegisterFlags Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep RegisterFlags Source #
Instance details

Defined in Distribution.Simple.Setup

data SDistFlags Source #

Flags to sdist : (snapshot, verbosity)

Instances

Instances details
Show SDistFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Generic SDistFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup SDistFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid SDistFlags Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep SDistFlags Source #
Instance details

Defined in Distribution.Simple.Setup

data TestFlags Source #

Instances

Instances details
Generic TestFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup TestFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid TestFlags Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep TestFlags Source #
Instance details

Defined in Distribution.Simple.Setup

data TestShowDetails Source #

Instances

Instances details
Bounded TestShowDetails Source #
Instance details

Defined in Distribution.Simple.Setup

Enum TestShowDetails Source #
Instance details

Defined in Distribution.Simple.Setup

Eq TestShowDetails Source #
Instance details

Defined in Distribution.Simple.Setup

Ord TestShowDetails Source #
Instance details

Defined in Distribution.Simple.Setup

Show TestShowDetails Source #
Instance details

Defined in Distribution.Simple.Setup

Generic TestShowDetails Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup TestShowDetails Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid TestShowDetails Source #
Instance details

Defined in Distribution.Simple.Setup

Binary TestShowDetails Source #
Instance details

Defined in Distribution.Simple.Setup

Structured TestShowDetails Source #
Instance details

Defined in Distribution.Simple.Setup

Pretty TestShowDetails Source #
Instance details

Defined in Distribution.Simple.Setup

Parsec TestShowDetails Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep TestShowDetails Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep TestShowDetails = D1 (' MetaData "TestShowDetails" "Distribution.Simple.Setup" "Cabal-3.2.1.0-3w1fQQbNnuQ5xlFGwVXcPy" ' False ) (( C1 (' MetaCons "Never" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "Failures" ' PrefixI ' False ) ( U1 :: Type -> Type )) :+: ( C1 (' MetaCons "Always" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: ( C1 (' MetaCons "Streaming" ' PrefixI ' False ) ( U1 :: Type -> Type ) :+: C1 (' MetaCons "Direct" ' PrefixI ' False ) ( U1 :: Type -> Type ))))

data BenchmarkFlags Source #

Instances

Instances details
Generic BenchmarkFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Semigroup BenchmarkFlags Source #
Instance details

Defined in Distribution.Simple.Setup

Monoid BenchmarkFlags Source #
Instance details

Defined in Distribution.Simple.Setup

type Rep BenchmarkFlags Source #
Instance details

Defined in Distribution.Simple.Setup

data CopyDest Source #

The location prefix for the copy command.

Constructors

NoCopyDest
CopyTo FilePath
CopyToDb FilePath

when using the ${pkgroot} as prefix. The CopyToDb will adjust the paths to be relative to the provided package database when copying / installing.

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.

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"]

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

Instances details
Functor Flag Source #
Instance details

Defined in Distribution.Simple.Flag

Applicative Flag Source #
Instance details

Defined in Distribution.Simple.Flag

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

Defined in Distribution.Simple.Flag

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

Defined in Distribution.Simple.Flag

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

Defined in Distribution.Simple.Flag

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

Defined in Distribution.Simple.Flag

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

Defined in Distribution.Simple.Flag

Generic ( Flag a) Source #
Instance details

Defined in Distribution.Simple.Flag

Associated Types

type Rep ( Flag a) :: Type -> Type Source #

Semigroup ( Flag a) Source #
Instance details

Defined in Distribution.Simple.Flag

Monoid ( Flag a) Source #
Instance details

Defined in Distribution.Simple.Flag

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

Defined in Distribution.Simple.Flag

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

Defined in Distribution.Simple.Flag

type Rep ( Flag a) Source #
Instance details

Defined in Distribution.Simple.Flag

type Rep ( Flag a) = D1 (' MetaData "Flag" "Distribution.Simple.Flag" "Cabal-3.2.1.0-3w1fQQbNnuQ5xlFGwVXcPy" ' False ) ( C1 (' MetaCons "Flag" ' PrefixI ' False ) ( S1 (' MetaSel (' Nothing :: Maybe Symbol ) ' NoSourceUnpackedness ' NoSourceStrictness ' DecidedLazy ) ( Rec0 a)) :+: C1 (' MetaCons "NoFlag" ' PrefixI ' False ) ( U1 :: Type -> Type ))

class BooleanFlag a where Source #

Types that represent boolean flags.

Instances

Instances details
BooleanFlag Bool Source #
Instance details

Defined in Distribution.Simple.Flag