Cabal-2.4.1.0: A framework for packaging Haskell software

CopyrightIsaac Jones 2003-2005
LicenseBSD3
Maintainercabal-devel@haskell.org
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Distribution.PackageDescription

Contents

Description

Backwards compatibility reexport of everything you need to know about .cabal files.

Synopsis

Package descriptions

data PackageDescription #

This data type is the internal representation of the file pkg.cabal. It contains two kinds of information about the package: information which is needed for all packages, such as the package name and version, and information which is needed for the simple build system only, such as the compiler options and library name.

Constructors

PackageDescription 

Fields

Instances
Eq PackageDescription # 
Instance details

Defined in Distribution.Types.PackageDescription

Data PackageDescription # 
Instance details

Defined in Distribution.Types.PackageDescription

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> PackageDescription -> c PackageDescription #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c PackageDescription #

toConstr :: PackageDescription -> Constr #

dataTypeOf :: PackageDescription -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c PackageDescription) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c PackageDescription) #

gmapT :: (forall b. Data b => b -> b) -> PackageDescription -> PackageDescription #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> PackageDescription -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> PackageDescription -> r #

gmapQ :: (forall d. Data d => d -> u) -> PackageDescription -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> PackageDescription -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> PackageDescription -> m PackageDescription #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageDescription -> m PackageDescription #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> PackageDescription -> m PackageDescription #

Read PackageDescription # 
Instance details

Defined in Distribution.Types.PackageDescription

Show PackageDescription # 
Instance details

Defined in Distribution.Types.PackageDescription

Generic PackageDescription # 
Instance details

Defined in Distribution.Types.PackageDescription

Associated Types

type Rep PackageDescription :: * -> * #

Binary PackageDescription # 
Instance details

Defined in Distribution.Types.PackageDescription

NFData PackageDescription # 
Instance details

Defined in Distribution.Types.PackageDescription

Methods

rnf :: PackageDescription -> () #

Package PackageDescription # 
Instance details

Defined in Distribution.Types.PackageDescription

HasBuildInfos PackageDescription # 
Instance details

Defined in Distribution.Types.PackageDescription

type Rep PackageDescription # 
Instance details

Defined in Distribution.Types.PackageDescription

type Rep PackageDescription = D1 (MetaData "PackageDescription" "Distribution.Types.PackageDescription" "Cabal-2.4.1.0-ALhzvdqe44A7vLWPOxSupv" False) (C1 (MetaCons "PackageDescription" PrefixI True) ((((S1 (MetaSel (Just "specVersionRaw") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Either Version VersionRange)) :*: (S1 (MetaSel (Just "package") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 PackageIdentifier) :*: S1 (MetaSel (Just "licenseRaw") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Either License License)))) :*: ((S1 (MetaSel (Just "licenseFiles") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath]) :*: S1 (MetaSel (Just "copyright") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :*: (S1 (MetaSel (Just "maintainer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Just "author") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))) :*: (((S1 (MetaSel (Just "stability") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Just "testedWith") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(CompilerFlavor, VersionRange)])) :*: (S1 (MetaSel (Just "homepage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Just "pkgUrl") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))) :*: ((S1 (MetaSel (Just "bugReports") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Just "sourceRepos") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [SourceRepo])) :*: (S1 (MetaSel (Just "synopsis") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Just "description") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))))) :*: (((S1 (MetaSel (Just "category") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: (S1 (MetaSel (Just "customFieldsPD") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(String, String)]) :*: S1 (MetaSel (Just "buildTypeRaw") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe BuildType)))) :*: ((S1 (MetaSel (Just "setupBuildInfo") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe SetupBuildInfo)) :*: S1 (MetaSel (Just "library") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Library))) :*: (S1 (MetaSel (Just "subLibraries") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Library]) :*: S1 (MetaSel (Just "executables") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Executable])))) :*: (((S1 (MetaSel (Just "foreignLibs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ForeignLib]) :*: S1 (MetaSel (Just "testSuites") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [TestSuite])) :*: (S1 (MetaSel (Just "benchmarks") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Benchmark]) :*: S1 (MetaSel (Just "dataFiles") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath]))) :*: ((S1 (MetaSel (Just "dataDir") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath) :*: S1 (MetaSel (Just "extraSrcFiles") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath])) :*: (S1 (MetaSel (Just "extraTmpFiles") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath]) :*: S1 (MetaSel (Just "extraDocFiles") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath])))))))

specVersion :: PackageDescription -> Version #

The version of the Cabal spec that this package should be interpreted against.

Historically we used a version range but we are switching to using a single version. Currently we accept either. This function converts into a single version by ignoring upper bounds in the version range.

buildType :: PackageDescription -> BuildType #

The effective build-type after applying defaulting rules.

The original build-type value parsed is stored in the buildTypeRaw field. However, the build-type field is optional and can therefore be empty in which case we need to compute the effective build-type. This function implements the following defaulting rules:

  • For cabal-version:2.0 and below, default to the Custom build-type unconditionally.
  • Otherwise, if a custom-setup stanza is defined, default to the Custom build-type; else default to Simple build-type.

Since: 2.2

license :: PackageDescription -> License #

The SPDX LicenseExpression of the package.

Since: 2.2.0.0

descCabalVersion :: PackageDescription -> VersionRange #

Deprecated: Use specVersion instead. This symbol will be removed in Cabal-3.0 (est. Mar 2019).

The range of versions of the Cabal tools that this package is intended to work with.

This function is deprecated and should not be used for new purposes, only to support old packages that rely on the old interpretation.

data BuildType #

The type of build system used by this package.

Constructors

Simple

calls Distribution.Simple.defaultMain

Configure

calls Distribution.Simple.defaultMainWithHooks defaultUserHooks, which invokes configure to generate additional build information used by later phases.

Make

calls Distribution.Make.defaultMain

Custom

uses user-supplied Setup.hs or Setup.lhs (default)

Instances
Eq BuildType # 
Instance details

Defined in Distribution.Types.BuildType

Data BuildType # 
Instance details

Defined in Distribution.Types.BuildType

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BuildType -> c BuildType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BuildType #

toConstr :: BuildType -> Constr #

dataTypeOf :: BuildType -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BuildType) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BuildType) #

gmapT :: (forall b. Data b => b -> b) -> BuildType -> BuildType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuildType -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuildType -> r #

gmapQ :: (forall d. Data d => d -> u) -> BuildType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> BuildType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuildType -> m BuildType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuildType -> m BuildType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuildType -> m BuildType #

Read BuildType # 
Instance details

Defined in Distribution.Types.BuildType

Show BuildType # 
Instance details

Defined in Distribution.Types.BuildType

Generic BuildType # 
Instance details

Defined in Distribution.Types.BuildType

Associated Types

type Rep BuildType :: * -> * #

Binary BuildType # 
Instance details

Defined in Distribution.Types.BuildType

NFData BuildType # 
Instance details

Defined in Distribution.Types.BuildType

Methods

rnf :: BuildType -> () #

Pretty BuildType # 
Instance details

Defined in Distribution.Types.BuildType

Methods

pretty :: BuildType -> Doc #

Parsec BuildType # 
Instance details

Defined in Distribution.Types.BuildType

Methods

parsec :: CabalParsing m => m BuildType #

Text BuildType # 
Instance details

Defined in Distribution.Types.BuildType

type Rep BuildType # 
Instance details

Defined in Distribution.Types.BuildType

type Rep BuildType = D1 (MetaData "BuildType" "Distribution.Types.BuildType" "Cabal-2.4.1.0-ALhzvdqe44A7vLWPOxSupv" False) ((C1 (MetaCons "Simple" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "Configure" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "Make" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "Custom" PrefixI False) (U1 :: * -> *)))

Renaming (syntactic)

data ModuleRenaming #

Renaming applied to the modules provided by a package. The boolean indicates whether or not to also include all of the original names of modules. Thus, ModuleRenaming False [] is "don't expose any modules, and ModuleRenaming True [(Data.Bool, Bool)] is, "expose all modules, but also expose Data.Bool as Bool". If a renaming is omitted you get the DefaultRenaming.

(NB: This is a list not a map so that we can preserve order.)

Constructors

ModuleRenaming [(ModuleName, ModuleName)]

A module renaming/thinning; e.g., (A as B, C as C) brings B and C into scope.

DefaultRenaming

The default renaming, bringing all exported modules into scope.

HidingRenaming [ModuleName]

Hiding renaming, e.g., hiding (A, B), bringing all exported modules into scope except the hidden ones.

Instances
Eq ModuleRenaming # 
Instance details

Defined in Distribution.Types.ModuleRenaming

Data ModuleRenaming # 
Instance details

Defined in Distribution.Types.ModuleRenaming

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ModuleRenaming -> c ModuleRenaming #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ModuleRenaming #

toConstr :: ModuleRenaming -> Constr #

dataTypeOf :: ModuleRenaming -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ModuleRenaming) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ModuleRenaming) #

gmapT :: (forall b. Data b => b -> b) -> ModuleRenaming -> ModuleRenaming #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ModuleRenaming -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ModuleRenaming -> r #

gmapQ :: (forall d. Data d => d -> u) -> ModuleRenaming -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ModuleRenaming -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ModuleRenaming -> m ModuleRenaming #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ModuleRenaming -> m ModuleRenaming #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ModuleRenaming -> m ModuleRenaming #

Ord ModuleRenaming # 
Instance details

Defined in Distribution.Types.ModuleRenaming

Read ModuleRenaming # 
Instance details

Defined in Distribution.Types.ModuleRenaming

Show ModuleRenaming # 
Instance details

Defined in Distribution.Types.ModuleRenaming

Generic ModuleRenaming # 
Instance details

Defined in Distribution.Types.ModuleRenaming

Associated Types

type Rep ModuleRenaming :: * -> * #

Binary ModuleRenaming # 
Instance details

Defined in Distribution.Types.ModuleRenaming

NFData ModuleRenaming # 
Instance details

Defined in Distribution.Types.ModuleRenaming

Methods

rnf :: ModuleRenaming -> () #

Pretty ModuleRenaming # 
Instance details

Defined in Distribution.Types.ModuleRenaming

Methods

pretty :: ModuleRenaming -> Doc #

Parsec ModuleRenaming # 
Instance details

Defined in Distribution.Types.ModuleRenaming

Text ModuleRenaming # 
Instance details

Defined in Distribution.Types.ModuleRenaming

type Rep ModuleRenaming # 
Instance details

Defined in Distribution.Types.ModuleRenaming

type Rep ModuleRenaming = D1 (MetaData "ModuleRenaming" "Distribution.Types.ModuleRenaming" "Cabal-2.4.1.0-ALhzvdqe44A7vLWPOxSupv" False) (C1 (MetaCons "ModuleRenaming" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(ModuleName, ModuleName)])) :+: (C1 (MetaCons "DefaultRenaming" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "HidingRenaming" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ModuleName]))))

defaultRenaming :: ModuleRenaming #

The default renaming, if something is specified in build-depends only.

Libraries

data Library #

Constructors

Library 

Fields

Instances
Eq Library # 
Instance details

Defined in Distribution.Types.Library

Methods

(==) :: Library -> Library -> Bool #

(/=) :: Library -> Library -> Bool #

Data Library # 
Instance details

Defined in Distribution.Types.Library

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Library -> c Library #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Library #

toConstr :: Library -> Constr #

dataTypeOf :: Library -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Library) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Library) #

gmapT :: (forall b. Data b => b -> b) -> Library -> Library #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Library -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Library -> r #

gmapQ :: (forall d. Data d => d -> u) -> Library -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Library -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Library -> m Library #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Library -> m Library #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Library -> m Library #

Read Library # 
Instance details

Defined in Distribution.Types.Library

Show Library # 
Instance details

Defined in Distribution.Types.Library

Generic Library # 
Instance details

Defined in Distribution.Types.Library

Associated Types

type Rep Library :: * -> * #

Methods

from :: Library -> Rep Library x #

to :: Rep Library x -> Library #

Semigroup Library # 
Instance details

Defined in Distribution.Types.Library

Monoid Library # 
Instance details

Defined in Distribution.Types.Library

Binary Library # 
Instance details

Defined in Distribution.Types.Library

Methods

put :: Library -> Put #

get :: Get Library #

putList :: [Library] -> Put #

NFData Library # 
Instance details

Defined in Distribution.Types.Library

Methods

rnf :: Library -> () #

HasBuildInfo Library # 
Instance details

Defined in Distribution.Types.Library

Methods

buildInfo :: Lens' Library BuildInfo #

buildable :: Lens' Library Bool #

buildTools :: Lens' Library [LegacyExeDependency] #

buildToolDepends :: Lens' Library [ExeDependency] #

cppOptions :: Lens' Library [String] #

asmOptions :: Lens' Library [String] #

cmmOptions :: Lens' Library [String] #

ccOptions :: Lens' Library [String] #

cxxOptions :: Lens' Library [String] #

ldOptions :: Lens' Library [String] #

pkgconfigDepends :: Lens' Library [PkgconfigDependency] #

frameworks :: Lens' Library [String] #

extraFrameworkDirs :: Lens' Library [String] #

asmSources :: Lens' Library [FilePath] #

cmmSources :: Lens' Library [FilePath] #

cSources :: Lens' Library [FilePath] #

cxxSources :: Lens' Library [FilePath] #

jsSources :: Lens' Library [FilePath] #

hsSourceDirs :: Lens' Library [FilePath] #

otherModules :: Lens' Library [ModuleName] #

virtualModules :: Lens' Library [ModuleName] #

autogenModules :: Lens' Library [ModuleName] #

defaultLanguage :: Lens' Library (Maybe Language) #

otherLanguages :: Lens' Library [Language] #

defaultExtensions :: Lens' Library [Extension] #

otherExtensions :: Lens' Library [Extension] #

oldExtensions :: Lens' Library [Extension] #

extraLibs :: Lens' Library [String] #

extraGHCiLibs :: Lens' Library [String] #

extraBundledLibs :: Lens' Library [String] #

extraLibFlavours :: Lens' Library [String] #

extraLibDirs :: Lens' Library [String] #

includeDirs :: Lens' Library [FilePath] #

includes :: Lens' Library [FilePath] #

installIncludes :: Lens' Library [FilePath] #

options :: Lens' Library [(CompilerFlavor, [String])] #

profOptions :: Lens' Library [(CompilerFlavor, [String])] #

sharedOptions :: Lens' Library [(CompilerFlavor, [String])] #

staticOptions :: Lens' Library [(CompilerFlavor, [String])] #

customFieldsBI :: Lens' Library [(String, String)] #

targetBuildDepends :: Lens' Library [Dependency] #

mixins :: Lens' Library [Mixin] #

type Rep Library # 
Instance details

Defined in Distribution.Types.Library

data ModuleReexport #

Instances
Eq ModuleReexport # 
Instance details

Defined in Distribution.Types.ModuleReexport

Data ModuleReexport # 
Instance details

Defined in Distribution.Types.ModuleReexport

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ModuleReexport -> c ModuleReexport #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ModuleReexport #

toConstr :: ModuleReexport -> Constr #

dataTypeOf :: ModuleReexport -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ModuleReexport) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ModuleReexport) #

gmapT :: (forall b. Data b => b -> b) -> ModuleReexport -> ModuleReexport #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ModuleReexport -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ModuleReexport -> r #

gmapQ :: (forall d. Data d => d -> u) -> ModuleReexport -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ModuleReexport -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ModuleReexport -> m ModuleReexport #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ModuleReexport -> m ModuleReexport #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ModuleReexport -> m ModuleReexport #

Read ModuleReexport # 
Instance details

Defined in Distribution.Types.ModuleReexport

Show ModuleReexport # 
Instance details

Defined in Distribution.Types.ModuleReexport

Generic ModuleReexport # 
Instance details

Defined in Distribution.Types.ModuleReexport

Associated Types

type Rep ModuleReexport :: * -> * #

Binary ModuleReexport # 
Instance details

Defined in Distribution.Types.ModuleReexport

NFData ModuleReexport # 
Instance details

Defined in Distribution.Types.ModuleReexport

Methods

rnf :: ModuleReexport -> () #

Pretty ModuleReexport # 
Instance details

Defined in Distribution.Types.ModuleReexport

Methods

pretty :: ModuleReexport -> Doc #

Parsec ModuleReexport # 
Instance details

Defined in Distribution.Types.ModuleReexport

Text ModuleReexport # 
Instance details

Defined in Distribution.Types.ModuleReexport

type Rep ModuleReexport # 
Instance details

Defined in Distribution.Types.ModuleReexport

type Rep ModuleReexport = D1 (MetaData "ModuleReexport" "Distribution.Types.ModuleReexport" "Cabal-2.4.1.0-ALhzvdqe44A7vLWPOxSupv" False) (C1 (MetaCons "ModuleReexport" PrefixI True) (S1 (MetaSel (Just "moduleReexportOriginalPackage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe PackageName)) :*: (S1 (MetaSel (Just "moduleReexportOriginalName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ModuleName) :*: S1 (MetaSel (Just "moduleReexportName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ModuleName))))

withLib :: PackageDescription -> (Library -> IO ()) -> IO () #

If the package description has a buildable library section, call the given function with the library build info as argument. You probably want withLibLBI if you have a LocalBuildInfo, see the note in Distribution.Types.ComponentRequestedSpec for more information.

hasPublicLib :: PackageDescription -> Bool #

Does this package have a buildable PUBLIC library?

hasLibs :: PackageDescription -> Bool #

Does this package have any libraries?

explicitLibModules :: Library -> [ModuleName] #

Get all the module names from the library (exposed and internal modules) which are explicitly listed in the package description which would need to be compiled. (This does not include reexports, which do not need to be compiled.) This may not include all modules for which GHC generated interface files (i.e., implicit modules.)

libModulesAutogen :: Library -> [ModuleName] #

Get all the auto generated module names from the library, exposed or not. This are a subset of libModules.

libModules :: Library -> [ModuleName] #

Deprecated: If you want all modules that are built with a library, use allLibModules. Otherwise, use explicitLibModules for ONLY the modules explicitly mentioned in the package description. This symbol will be removed in Cabal-3.0 (est. Mar 2019).

Backwards-compatibility shim for explicitLibModules. In most cases, you actually want allLibModules, which returns all modules that will actually be compiled, as opposed to those which are explicitly listed in the package description (explicitLibModules); unfortunately, the type signature for allLibModules is incompatible since we need a ComponentLocalBuildInfo.

Executables

data Executable #

Instances
Eq Executable # 
Instance details

Defined in Distribution.Types.Executable

Data Executable # 
Instance details

Defined in Distribution.Types.Executable

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Executable -> c Executable #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Executable #

toConstr :: Executable -> Constr #

dataTypeOf :: Executable -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Executable) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Executable) #

gmapT :: (forall b. Data b => b -> b) -> Executable -> Executable #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Executable -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Executable -> r #

gmapQ :: (forall d. Data d => d -> u) -> Executable -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Executable -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Executable -> m Executable #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Executable -> m Executable #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Executable -> m Executable #

Read Executable # 
Instance details

Defined in Distribution.Types.Executable

Show Executable # 
Instance details

Defined in Distribution.Types.Executable

Generic Executable # 
Instance details

Defined in Distribution.Types.Executable

Associated Types

type Rep Executable :: * -> * #

Semigroup Executable # 
Instance details

Defined in Distribution.Types.Executable

Monoid Executable # 
Instance details

Defined in Distribution.Types.Executable

Binary Executable # 
Instance details

Defined in Distribution.Types.Executable

NFData Executable # 
Instance details

Defined in Distribution.Types.Executable

Methods

rnf :: Executable -> () #

HasBuildInfo Executable # 
Instance details

Defined in Distribution.Types.Executable

Methods

buildInfo :: Lens' Executable BuildInfo #

buildable :: Lens' Executable Bool #

buildTools :: Lens' Executable [LegacyExeDependency] #

buildToolDepends :: Lens' Executable [ExeDependency] #

cppOptions :: Lens' Executable [String] #

asmOptions :: Lens' Executable [String] #

cmmOptions :: Lens' Executable [String] #

ccOptions :: Lens' Executable [String] #

cxxOptions :: Lens' Executable [String] #

ldOptions :: Lens' Executable [String] #

pkgconfigDepends :: Lens' Executable [PkgconfigDependency] #

frameworks :: Lens' Executable [String] #

extraFrameworkDirs :: Lens' Executable [String] #

asmSources :: Lens' Executable [FilePath] #

cmmSources :: Lens' Executable [FilePath] #

cSources :: Lens' Executable [FilePath] #

cxxSources :: Lens' Executable [FilePath] #

jsSources :: Lens' Executable [FilePath] #

hsSourceDirs :: Lens' Executable [FilePath] #

otherModules :: Lens' Executable [ModuleName] #

virtualModules :: Lens' Executable [ModuleName] #

autogenModules :: Lens' Executable [ModuleName] #

defaultLanguage :: Lens' Executable (Maybe Language) #

otherLanguages :: Lens' Executable [Language] #

defaultExtensions :: Lens' Executable [Extension] #

otherExtensions :: Lens' Executable [Extension] #

oldExtensions :: Lens' Executable [Extension] #

extraLibs :: Lens' Executable [String] #

extraGHCiLibs :: Lens' Executable [String] #

extraBundledLibs :: Lens' Executable [String] #

extraLibFlavours :: Lens' Executable [String] #

extraLibDirs :: Lens' Executable [String] #

includeDirs :: Lens' Executable [FilePath] #

includes :: Lens' Executable [FilePath] #

installIncludes :: Lens' Executable [FilePath] #

options :: Lens' Executable [(CompilerFlavor, [String])] #

profOptions :: Lens' Executable [(CompilerFlavor, [String])] #

sharedOptions :: Lens' Executable [(CompilerFlavor, [String])] #

staticOptions :: Lens' Executable [(CompilerFlavor, [String])] #

customFieldsBI :: Lens' Executable [(String, String)] #

targetBuildDepends :: Lens' Executable [Dependency] #

mixins :: Lens' Executable [Mixin] #

type Rep Executable # 
Instance details

Defined in Distribution.Types.Executable

withExe :: PackageDescription -> (Executable -> IO ()) -> IO () #

Perform the action on each buildable Executable in the package description. You probably want withExeLBI if you have a LocalBuildInfo, see the note in Distribution.Types.ComponentRequestedSpec for more information.

hasExes :: PackageDescription -> Bool #

does this package have any executables?

exeModules :: Executable -> [ModuleName] #

Get all the module names from an exe

exeModulesAutogen :: Executable -> [ModuleName] #

Get all the auto generated module names from an exe This are a subset of exeModules.

Tests

data TestSuite #

A "test-suite" stanza in a cabal file.

Instances
Eq TestSuite # 
Instance details

Defined in Distribution.Types.TestSuite

Data TestSuite # 
Instance details

Defined in Distribution.Types.TestSuite

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TestSuite -> c TestSuite #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TestSuite #

toConstr :: TestSuite -> Constr #

dataTypeOf :: TestSuite -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TestSuite) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TestSuite) #

gmapT :: (forall b. Data b => b -> b) -> TestSuite -> TestSuite #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TestSuite -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TestSuite -> r #

gmapQ :: (forall d. Data d => d -> u) -> TestSuite -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TestSuite -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TestSuite -> m TestSuite #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TestSuite -> m TestSuite #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TestSuite -> m TestSuite #

Read TestSuite # 
Instance details

Defined in Distribution.Types.TestSuite

Show TestSuite # 
Instance details

Defined in Distribution.Types.TestSuite

Generic TestSuite # 
Instance details

Defined in Distribution.Types.TestSuite

Associated Types

type Rep TestSuite :: * -> * #

Semigroup TestSuite # 
Instance details

Defined in Distribution.Types.TestSuite

Monoid TestSuite # 
Instance details

Defined in Distribution.Types.TestSuite

Binary TestSuite # 
Instance details

Defined in Distribution.Types.TestSuite

NFData TestSuite # 
Instance details

Defined in Distribution.Types.TestSuite

Methods

rnf :: TestSuite -> () #

HasBuildInfo TestSuite # 
Instance details

Defined in Distribution.Types.TestSuite

Methods

buildInfo :: Lens' TestSuite BuildInfo #

buildable :: Lens' TestSuite Bool #

buildTools :: Lens' TestSuite [LegacyExeDependency] #

buildToolDepends :: Lens' TestSuite [ExeDependency] #

cppOptions :: Lens' TestSuite [String] #

asmOptions :: Lens' TestSuite [String] #

cmmOptions :: Lens' TestSuite [String] #

ccOptions :: Lens' TestSuite [String] #

cxxOptions :: Lens' TestSuite [String] #

ldOptions :: Lens' TestSuite [String] #

pkgconfigDepends :: Lens' TestSuite [PkgconfigDependency] #

frameworks :: Lens' TestSuite [String] #

extraFrameworkDirs :: Lens' TestSuite [String] #

asmSources :: Lens' TestSuite [FilePath] #

cmmSources :: Lens' TestSuite [FilePath] #

cSources :: Lens' TestSuite [FilePath] #

cxxSources :: Lens' TestSuite [FilePath] #

jsSources :: Lens' TestSuite [FilePath] #

hsSourceDirs :: Lens' TestSuite [FilePath] #

otherModules :: Lens' TestSuite [ModuleName] #

virtualModules :: Lens' TestSuite [ModuleName] #

autogenModules :: Lens' TestSuite [ModuleName] #

defaultLanguage :: Lens' TestSuite (Maybe Language) #

otherLanguages :: Lens' TestSuite [Language] #

defaultExtensions :: Lens' TestSuite [Extension] #

otherExtensions :: Lens' TestSuite [Extension] #

oldExtensions :: Lens' TestSuite [Extension] #

extraLibs :: Lens' TestSuite [String] #

extraGHCiLibs :: Lens' TestSuite [String] #

extraBundledLibs :: Lens' TestSuite [String] #

extraLibFlavours :: Lens' TestSuite [String] #

extraLibDirs :: Lens' TestSuite [String] #

includeDirs :: Lens' TestSuite [FilePath] #

includes :: Lens' TestSuite [FilePath] #

installIncludes :: Lens' TestSuite [FilePath] #

options :: Lens' TestSuite [(CompilerFlavor, [String])] #

profOptions :: Lens' TestSuite [(CompilerFlavor, [String])] #

sharedOptions :: Lens' TestSuite [(CompilerFlavor, [String])] #

staticOptions :: Lens' TestSuite [(CompilerFlavor, [String])] #

customFieldsBI :: Lens' TestSuite [(String, String)] #

targetBuildDepends :: Lens' TestSuite [Dependency] #

mixins :: Lens' TestSuite [Mixin] #

type Rep TestSuite # 
Instance details

Defined in Distribution.Types.TestSuite

type Rep TestSuite = D1 (MetaData "TestSuite" "Distribution.Types.TestSuite" "Cabal-2.4.1.0-ALhzvdqe44A7vLWPOxSupv" False) (C1 (MetaCons "TestSuite" PrefixI True) (S1 (MetaSel (Just "testName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UnqualComponentName) :*: (S1 (MetaSel (Just "testInterface") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 TestSuiteInterface) :*: S1 (MetaSel (Just "testBuildInfo") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BuildInfo))))

data TestSuiteInterface #

The test suite interfaces that are currently defined. Each test suite must specify which interface it supports.

More interfaces may be defined in future, either new revisions or totally new interfaces.

Constructors

TestSuiteExeV10 Version FilePath

Test interface "exitcode-stdio-1.0". The test-suite takes the form of an executable. It returns a zero exit code for success, non-zero for failure. The stdout and stderr channels may be logged. It takes no command line parameters and nothing on stdin.

TestSuiteLibV09 Version ModuleName

Test interface "detailed-0.9". The test-suite takes the form of a library containing a designated module that exports "tests :: [Test]".

TestSuiteUnsupported TestType

A test suite that does not conform to one of the above interfaces for the given reason (e.g. unknown test type).

Instances
Eq TestSuiteInterface # 
Instance details

Defined in Distribution.Types.TestSuiteInterface

Data TestSuiteInterface # 
Instance details

Defined in Distribution.Types.TestSuiteInterface

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TestSuiteInterface -> c TestSuiteInterface #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TestSuiteInterface #

toConstr :: TestSuiteInterface -> Constr #

dataTypeOf :: TestSuiteInterface -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TestSuiteInterface) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TestSuiteInterface) #

gmapT :: (forall b. Data b => b -> b) -> TestSuiteInterface -> TestSuiteInterface #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TestSuiteInterface -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TestSuiteInterface -> r #

gmapQ :: (forall d. Data d => d -> u) -> TestSuiteInterface -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TestSuiteInterface -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TestSuiteInterface -> m TestSuiteInterface #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TestSuiteInterface -> m TestSuiteInterface #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TestSuiteInterface -> m TestSuiteInterface #

Read TestSuiteInterface # 
Instance details

Defined in Distribution.Types.TestSuiteInterface

Show TestSuiteInterface # 
Instance details

Defined in Distribution.Types.TestSuiteInterface

Generic TestSuiteInterface # 
Instance details

Defined in Distribution.Types.TestSuiteInterface

Associated Types

type Rep TestSuiteInterface :: * -> * #

Semigroup TestSuiteInterface # 
Instance details

Defined in Distribution.Types.TestSuiteInterface

Monoid TestSuiteInterface # 
Instance details

Defined in Distribution.Types.TestSuiteInterface

Binary TestSuiteInterface # 
Instance details

Defined in Distribution.Types.TestSuiteInterface

NFData TestSuiteInterface # 
Instance details

Defined in Distribution.Types.TestSuiteInterface

Methods

rnf :: TestSuiteInterface -> () #

type Rep TestSuiteInterface # 
Instance details

Defined in Distribution.Types.TestSuiteInterface

data TestType #

The "test-type" field in the test suite stanza.

Constructors

TestTypeExe Version

"type: exitcode-stdio-x.y"

TestTypeLib Version

"type: detailed-x.y"

TestTypeUnknown String Version

Some unknown test type e.g. "type: foo"

Instances
Eq TestType # 
Instance details

Defined in Distribution.Types.TestType

Data TestType # 
Instance details

Defined in Distribution.Types.TestType

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> TestType -> c TestType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c TestType #

toConstr :: TestType -> Constr #

dataTypeOf :: TestType -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c TestType) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c TestType) #

gmapT :: (forall b. Data b => b -> b) -> TestType -> TestType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> TestType -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> TestType -> r #

gmapQ :: (forall d. Data d => d -> u) -> TestType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> TestType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> TestType -> m TestType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> TestType -> m TestType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> TestType -> m TestType #

Read TestType # 
Instance details

Defined in Distribution.Types.TestType

Show TestType # 
Instance details

Defined in Distribution.Types.TestType

Generic TestType # 
Instance details

Defined in Distribution.Types.TestType

Associated Types

type Rep TestType :: * -> * #

Methods

from :: TestType -> Rep TestType x #

to :: Rep TestType x -> TestType #

Binary TestType # 
Instance details

Defined in Distribution.Types.TestType

Methods

put :: TestType -> Put #

get :: Get TestType #

putList :: [TestType] -> Put #

NFData TestType # 
Instance details

Defined in Distribution.Types.TestType

Methods

rnf :: TestType -> () #

Pretty TestType # 
Instance details

Defined in Distribution.Types.TestType

Methods

pretty :: TestType -> Doc #

Parsec TestType # 
Instance details

Defined in Distribution.Types.TestType

Methods

parsec :: CabalParsing m => m TestType #

Text TestType # 
Instance details

Defined in Distribution.Types.TestType

Methods

disp :: TestType -> Doc #

parse :: ReadP r TestType #

type Rep TestType # 
Instance details

Defined in Distribution.Types.TestType

hasTests :: PackageDescription -> Bool #

Does this package have any test suites?

withTest :: PackageDescription -> (TestSuite -> IO ()) -> IO () #

Perform an action on each buildable TestSuite in a package. You probably want withTestLBI if you have a LocalBuildInfo, see the note in Distribution.Types.ComponentRequestedSpec for more information.

testModules :: TestSuite -> [ModuleName] #

Get all the module names from a test suite.

testModulesAutogen :: TestSuite -> [ModuleName] #

Get all the auto generated module names from a test suite. This are a subset of testModules.

Benchmarks

data Benchmark #

A "benchmark" stanza in a cabal file.

Instances
Eq Benchmark # 
Instance details

Defined in Distribution.Types.Benchmark

Data Benchmark # 
Instance details

Defined in Distribution.Types.Benchmark

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Benchmark -> c Benchmark #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Benchmark #

toConstr :: Benchmark -> Constr #

dataTypeOf :: Benchmark -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Benchmark) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Benchmark) #

gmapT :: (forall b. Data b => b -> b) -> Benchmark -> Benchmark #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Benchmark -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Benchmark -> r #

gmapQ :: (forall d. Data d => d -> u) -> Benchmark -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Benchmark -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Benchmark -> m Benchmark #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Benchmark -> m Benchmark #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Benchmark -> m Benchmark #

Read Benchmark # 
Instance details

Defined in Distribution.Types.Benchmark

Show Benchmark # 
Instance details

Defined in Distribution.Types.Benchmark

Generic Benchmark # 
Instance details

Defined in Distribution.Types.Benchmark

Associated Types

type Rep Benchmark :: * -> * #

Semigroup Benchmark # 
Instance details

Defined in Distribution.Types.Benchmark

Monoid Benchmark # 
Instance details

Defined in Distribution.Types.Benchmark

Binary Benchmark # 
Instance details

Defined in Distribution.Types.Benchmark

NFData Benchmark # 
Instance details

Defined in Distribution.Types.Benchmark

Methods

rnf :: Benchmark -> () #

HasBuildInfo Benchmark # 
Instance details

Defined in Distribution.Types.Benchmark

Methods

buildInfo :: Lens' Benchmark BuildInfo #

buildable :: Lens' Benchmark Bool #

buildTools :: Lens' Benchmark [LegacyExeDependency] #

buildToolDepends :: Lens' Benchmark [ExeDependency] #

cppOptions :: Lens' Benchmark [String] #

asmOptions :: Lens' Benchmark [String] #

cmmOptions :: Lens' Benchmark [String] #

ccOptions :: Lens' Benchmark [String] #

cxxOptions :: Lens' Benchmark [String] #

ldOptions :: Lens' Benchmark [String] #

pkgconfigDepends :: Lens' Benchmark [PkgconfigDependency] #

frameworks :: Lens' Benchmark [String] #

extraFrameworkDirs :: Lens' Benchmark [String] #

asmSources :: Lens' Benchmark [FilePath] #

cmmSources :: Lens' Benchmark [FilePath] #

cSources :: Lens' Benchmark [FilePath] #

cxxSources :: Lens' Benchmark [FilePath] #

jsSources :: Lens' Benchmark [FilePath] #

hsSourceDirs :: Lens' Benchmark [FilePath] #

otherModules :: Lens' Benchmark [ModuleName] #

virtualModules :: Lens' Benchmark [ModuleName] #

autogenModules :: Lens' Benchmark [ModuleName] #

defaultLanguage :: Lens' Benchmark (Maybe Language) #

otherLanguages :: Lens' Benchmark [Language] #

defaultExtensions :: Lens' Benchmark [Extension] #

otherExtensions :: Lens' Benchmark [Extension] #

oldExtensions :: Lens' Benchmark [Extension] #

extraLibs :: Lens' Benchmark [String] #

extraGHCiLibs :: Lens' Benchmark [String] #

extraBundledLibs :: Lens' Benchmark [String] #

extraLibFlavours :: Lens' Benchmark [String] #

extraLibDirs :: Lens' Benchmark [String] #

includeDirs :: Lens' Benchmark [FilePath] #

includes :: Lens' Benchmark [FilePath] #

installIncludes :: Lens' Benchmark [FilePath] #

options :: Lens' Benchmark [(CompilerFlavor, [String])] #

profOptions :: Lens' Benchmark [(CompilerFlavor, [String])] #

sharedOptions :: Lens' Benchmark [(CompilerFlavor, [String])] #

staticOptions :: Lens' Benchmark [(CompilerFlavor, [String])] #

customFieldsBI :: Lens' Benchmark [(String, String)] #

targetBuildDepends :: Lens' Benchmark [Dependency] #

mixins :: Lens' Benchmark [Mixin] #

type Rep Benchmark # 
Instance details

Defined in Distribution.Types.Benchmark

type Rep Benchmark = D1 (MetaData "Benchmark" "Distribution.Types.Benchmark" "Cabal-2.4.1.0-ALhzvdqe44A7vLWPOxSupv" False) (C1 (MetaCons "Benchmark" PrefixI True) (S1 (MetaSel (Just "benchmarkName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 UnqualComponentName) :*: (S1 (MetaSel (Just "benchmarkInterface") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BenchmarkInterface) :*: S1 (MetaSel (Just "benchmarkBuildInfo") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 BuildInfo))))

data BenchmarkInterface #

The benchmark interfaces that are currently defined. Each benchmark must specify which interface it supports.

More interfaces may be defined in future, either new revisions or totally new interfaces.

Constructors

BenchmarkExeV10 Version FilePath

Benchmark interface "exitcode-stdio-1.0". The benchmark takes the form of an executable. It returns a zero exit code for success, non-zero for failure. The stdout and stderr channels may be logged. It takes no command line parameters and nothing on stdin.

BenchmarkUnsupported BenchmarkType

A benchmark that does not conform to one of the above interfaces for the given reason (e.g. unknown benchmark type).

Instances
Eq BenchmarkInterface # 
Instance details

Defined in Distribution.Types.BenchmarkInterface

Data BenchmarkInterface # 
Instance details

Defined in Distribution.Types.BenchmarkInterface

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BenchmarkInterface -> c BenchmarkInterface #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BenchmarkInterface #

toConstr :: BenchmarkInterface -> Constr #

dataTypeOf :: BenchmarkInterface -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BenchmarkInterface) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BenchmarkInterface) #

gmapT :: (forall b. Data b => b -> b) -> BenchmarkInterface -> BenchmarkInterface #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BenchmarkInterface -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BenchmarkInterface -> r #

gmapQ :: (forall d. Data d => d -> u) -> BenchmarkInterface -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> BenchmarkInterface -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BenchmarkInterface -> m BenchmarkInterface #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BenchmarkInterface -> m BenchmarkInterface #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BenchmarkInterface -> m BenchmarkInterface #

Read BenchmarkInterface # 
Instance details

Defined in Distribution.Types.BenchmarkInterface

Show BenchmarkInterface # 
Instance details

Defined in Distribution.Types.BenchmarkInterface

Generic BenchmarkInterface # 
Instance details

Defined in Distribution.Types.BenchmarkInterface

Associated Types

type Rep BenchmarkInterface :: * -> * #

Semigroup BenchmarkInterface # 
Instance details

Defined in Distribution.Types.BenchmarkInterface

Monoid BenchmarkInterface # 
Instance details

Defined in Distribution.Types.BenchmarkInterface

Binary BenchmarkInterface # 
Instance details

Defined in Distribution.Types.BenchmarkInterface

NFData BenchmarkInterface # 
Instance details

Defined in Distribution.Types.BenchmarkInterface

Methods

rnf :: BenchmarkInterface -> () #

type Rep BenchmarkInterface # 
Instance details

Defined in Distribution.Types.BenchmarkInterface

data BenchmarkType #

The "benchmark-type" field in the benchmark stanza.

Constructors

BenchmarkTypeExe Version

"type: exitcode-stdio-x.y"

BenchmarkTypeUnknown String Version

Some unknown benchmark type e.g. "type: foo"

Instances
Eq BenchmarkType # 
Instance details

Defined in Distribution.Types.BenchmarkType

Data BenchmarkType # 
Instance details

Defined in Distribution.Types.BenchmarkType

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BenchmarkType -> c BenchmarkType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BenchmarkType #

toConstr :: BenchmarkType -> Constr #

dataTypeOf :: BenchmarkType -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BenchmarkType) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BenchmarkType) #

gmapT :: (forall b. Data b => b -> b) -> BenchmarkType -> BenchmarkType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BenchmarkType -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BenchmarkType -> r #

gmapQ :: (forall d. Data d => d -> u) -> BenchmarkType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> BenchmarkType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BenchmarkType -> m BenchmarkType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BenchmarkType -> m BenchmarkType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BenchmarkType -> m BenchmarkType #

Read BenchmarkType # 
Instance details

Defined in Distribution.Types.BenchmarkType

Show BenchmarkType # 
Instance details

Defined in Distribution.Types.BenchmarkType

Generic BenchmarkType # 
Instance details

Defined in Distribution.Types.BenchmarkType

Associated Types

type Rep BenchmarkType :: * -> * #

Binary BenchmarkType # 
Instance details

Defined in Distribution.Types.BenchmarkType

NFData BenchmarkType # 
Instance details

Defined in Distribution.Types.BenchmarkType

Methods

rnf :: BenchmarkType -> () #

Pretty BenchmarkType # 
Instance details

Defined in Distribution.Types.BenchmarkType

Methods

pretty :: BenchmarkType -> Doc #

Parsec BenchmarkType # 
Instance details

Defined in Distribution.Types.BenchmarkType

Text BenchmarkType # 
Instance details

Defined in Distribution.Types.BenchmarkType

type Rep BenchmarkType # 
Instance details

Defined in Distribution.Types.BenchmarkType

hasBenchmarks :: PackageDescription -> Bool #

Does this package have any benchmarks?

withBenchmark :: PackageDescription -> (Benchmark -> IO ()) -> IO () #

Perform an action on each buildable Benchmark in a package. You probably want withBenchLBI if you have a LocalBuildInfo, see the note in Distribution.Types.ComponentRequestedSpec for more information.

benchmarkModules :: Benchmark -> [ModuleName] #

Get all the module names from a benchmark.

benchmarkModulesAutogen :: Benchmark -> [ModuleName] #

Get all the auto generated module names from a benchmark. This are a subset of benchmarkModules.

Build information

data BuildInfo #

Constructors

BuildInfo 

Fields

Instances
Eq BuildInfo # 
Instance details

Defined in Distribution.Types.BuildInfo

Data BuildInfo # 
Instance details

Defined in Distribution.Types.BuildInfo

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> BuildInfo -> c BuildInfo #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BuildInfo #

toConstr :: BuildInfo -> Constr #

dataTypeOf :: BuildInfo -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BuildInfo) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BuildInfo) #

gmapT :: (forall b. Data b => b -> b) -> BuildInfo -> BuildInfo #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuildInfo -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuildInfo -> r #

gmapQ :: (forall d. Data d => d -> u) -> BuildInfo -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> BuildInfo -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo #

Read BuildInfo # 
Instance details

Defined in Distribution.Types.BuildInfo

Show BuildInfo # 
Instance details

Defined in Distribution.Types.BuildInfo

Generic BuildInfo # 
Instance details

Defined in Distribution.Types.BuildInfo

Associated Types

type Rep BuildInfo :: * -> * #

Semigroup BuildInfo # 
Instance details

Defined in Distribution.Types.BuildInfo

Monoid BuildInfo # 
Instance details

Defined in Distribution.Types.BuildInfo

Binary BuildInfo # 
Instance details

Defined in Distribution.Types.BuildInfo

NFData BuildInfo # 
Instance details

Defined in Distribution.Types.BuildInfo

Methods

rnf :: BuildInfo -> () #

HasBuildInfo BuildInfo # 
Instance details

Defined in Distribution.Types.BuildInfo.Lens

Methods

buildInfo :: Lens' BuildInfo BuildInfo #

buildable :: Lens' BuildInfo Bool #

buildTools :: Lens' BuildInfo [LegacyExeDependency] #

buildToolDepends :: Lens' BuildInfo [ExeDependency] #

cppOptions :: Lens' BuildInfo [String] #

asmOptions :: Lens' BuildInfo [String] #

cmmOptions :: Lens' BuildInfo [String] #

ccOptions :: Lens' BuildInfo [String] #

cxxOptions :: Lens' BuildInfo [String] #

ldOptions :: Lens' BuildInfo [String] #

pkgconfigDepends :: Lens' BuildInfo [PkgconfigDependency] #

frameworks :: Lens' BuildInfo [String] #

extraFrameworkDirs :: Lens' BuildInfo [String] #

asmSources :: Lens' BuildInfo [FilePath] #

cmmSources :: Lens' BuildInfo [FilePath] #

cSources :: Lens' BuildInfo [FilePath] #

cxxSources :: Lens' BuildInfo [FilePath] #

jsSources :: Lens' BuildInfo [FilePath] #

hsSourceDirs :: Lens' BuildInfo [FilePath] #

otherModules :: Lens' BuildInfo [ModuleName] #

virtualModules :: Lens' BuildInfo [ModuleName] #

autogenModules :: Lens' BuildInfo [ModuleName] #

defaultLanguage :: Lens' BuildInfo (Maybe Language) #

otherLanguages :: Lens' BuildInfo [Language] #

defaultExtensions :: Lens' BuildInfo [Extension] #

otherExtensions :: Lens' BuildInfo [Extension] #

oldExtensions :: Lens' BuildInfo [Extension] #

extraLibs :: Lens' BuildInfo [String] #

extraGHCiLibs :: Lens' BuildInfo [String] #

extraBundledLibs :: Lens' BuildInfo [String] #

extraLibFlavours :: Lens' BuildInfo [String] #

extraLibDirs :: Lens' BuildInfo [String] #

includeDirs :: Lens' BuildInfo [FilePath] #

includes :: Lens' BuildInfo [FilePath] #

installIncludes :: Lens' BuildInfo [FilePath] #

options :: Lens' BuildInfo [(CompilerFlavor, [String])] #

profOptions :: Lens' BuildInfo [(CompilerFlavor, [String])] #

sharedOptions :: Lens' BuildInfo [(CompilerFlavor, [String])] #

staticOptions :: Lens' BuildInfo [(CompilerFlavor, [String])] #

customFieldsBI :: Lens' BuildInfo [(String, String)] #

targetBuildDepends :: Lens' BuildInfo [Dependency] #

mixins :: Lens' BuildInfo [Mixin] #

type Rep BuildInfo # 
Instance details

Defined in Distribution.Types.BuildInfo

type Rep BuildInfo = D1 (MetaData "BuildInfo" "Distribution.Types.BuildInfo" "Cabal-2.4.1.0-ALhzvdqe44A7vLWPOxSupv" False) (C1 (MetaCons "BuildInfo" PrefixI True) (((((S1 (MetaSel (Just "buildable") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool) :*: S1 (MetaSel (Just "buildTools") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [LegacyExeDependency])) :*: (S1 (MetaSel (Just "buildToolDepends") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ExeDependency]) :*: (S1 (MetaSel (Just "cppOptions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String]) :*: S1 (MetaSel (Just "asmOptions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String])))) :*: ((S1 (MetaSel (Just "cmmOptions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String]) :*: S1 (MetaSel (Just "ccOptions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String])) :*: (S1 (MetaSel (Just "cxxOptions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String]) :*: (S1 (MetaSel (Just "ldOptions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String]) :*: S1 (MetaSel (Just "pkgconfigDepends") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [PkgconfigDependency]))))) :*: (((S1 (MetaSel (Just "frameworks") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String]) :*: S1 (MetaSel (Just "extraFrameworkDirs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String])) :*: (S1 (MetaSel (Just "asmSources") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath]) :*: (S1 (MetaSel (Just "cmmSources") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath]) :*: S1 (MetaSel (Just "cSources") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath])))) :*: ((S1 (MetaSel (Just "cxxSources") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath]) :*: S1 (MetaSel (Just "jsSources") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath])) :*: (S1 (MetaSel (Just "hsSourceDirs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath]) :*: (S1 (MetaSel (Just "otherModules") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ModuleName]) :*: S1 (MetaSel (Just "virtualModules") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ModuleName])))))) :*: ((((S1 (MetaSel (Just "autogenModules") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ModuleName]) :*: S1 (MetaSel (Just "defaultLanguage") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe Language))) :*: (S1 (MetaSel (Just "otherLanguages") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Language]) :*: (S1 (MetaSel (Just "defaultExtensions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Extension]) :*: S1 (MetaSel (Just "otherExtensions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Extension])))) :*: ((S1 (MetaSel (Just "oldExtensions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Extension]) :*: S1 (MetaSel (Just "extraLibs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String])) :*: (S1 (MetaSel (Just "extraGHCiLibs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String]) :*: (S1 (MetaSel (Just "extraBundledLibs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String]) :*: S1 (MetaSel (Just "extraLibFlavours") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String]))))) :*: (((S1 (MetaSel (Just "extraLibDirs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String]) :*: S1 (MetaSel (Just "includeDirs") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath])) :*: (S1 (MetaSel (Just "includes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath]) :*: (S1 (MetaSel (Just "installIncludes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath]) :*: S1 (MetaSel (Just "options") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(CompilerFlavor, [String])])))) :*: ((S1 (MetaSel (Just "profOptions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(CompilerFlavor, [String])]) :*: (S1 (MetaSel (Just "sharedOptions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(CompilerFlavor, [String])]) :*: S1 (MetaSel (Just "staticOptions") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(CompilerFlavor, [String])]))) :*: (S1 (MetaSel (Just "customFieldsBI") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(String, String)]) :*: (S1 (MetaSel (Just "targetBuildDepends") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Dependency]) :*: S1 (MetaSel (Just "mixins") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Mixin]))))))))

allBuildInfo :: PackageDescription -> [BuildInfo] #

All BuildInfo in the PackageDescription: libraries, executables, test-suites and benchmarks.

Useful for implementing package checks.

allLanguages :: BuildInfo -> [Language] #

The Languages used by this component

allExtensions :: BuildInfo -> [Extension] #

The Extensions that are used somewhere by this component

usedExtensions :: BuildInfo -> [Extension] #

The Extensions that are used by all modules in this component

usesTemplateHaskellOrQQ :: BuildInfo -> Bool #

Whether any modules in this component use Template Haskell or Quasi Quotes

hcOptions :: CompilerFlavor -> BuildInfo -> [String] #

Select options for a particular Haskell compiler.

Supplementary build information

allBuildDepends :: PackageDescription -> [Dependency] #

Get the combined build-depends entries of all components.

enabledBuildDepends :: PackageDescription -> ComponentRequestedSpec -> [Dependency] #

Get the combined build-depends entries of all enabled components, per the given request spec.

data ComponentName #

Instances
Eq ComponentName # 
Instance details

Defined in Distribution.Types.ComponentName

Ord ComponentName # 
Instance details

Defined in Distribution.Types.ComponentName

Read ComponentName # 
Instance details

Defined in Distribution.Types.ComponentName

Show ComponentName # 
Instance details

Defined in Distribution.Types.ComponentName

Generic ComponentName # 
Instance details

Defined in Distribution.Types.ComponentName

Associated Types

type Rep ComponentName :: * -> * #

Binary ComponentName # 
Instance details

Defined in Distribution.Types.ComponentName

Pretty ComponentName # 
Instance details

Defined in Distribution.Types.ComponentName

Methods

pretty :: ComponentName -> Doc #

Text ComponentName # 
Instance details

Defined in Distribution.Types.ComponentName

type Rep ComponentName # 
Instance details

Defined in Distribution.Types.ComponentName

type HookedBuildInfo = (Maybe BuildInfo, [(UnqualComponentName, BuildInfo)]) #

HookedBuildInfo is mechanism that hooks can use to override the BuildInfos inside packages. One example use-case (which is used in core libraries today) is as a way of passing flags which are computed by a configure script into Cabal. In this case, the autoconf build type adds hooks to read in a textual HookedBuildInfo format prior to doing any operations.

Quite honestly, this mechanism is a massive hack since we shouldn't be editing the PackageDescription data structure (it's easy to assume that this data structure shouldn't change and run into bugs, see for example 1c20a6328579af9e37677d507e2e9836ef70ab9d). But it's a bit convenient, because there isn't another data structure that allows adding extra BuildInfo style things.

In any case, a lot of care has to be taken to make sure the HookedBuildInfo is applied to the PackageDescription. In general this process occurs in Distribution.Simple, which is responsible for orchestrating the hooks mechanism. The general strategy:

  1. We run the pre-hook, which produces a HookedBuildInfo (e.g., in the Autoconf case, it reads it out from a file).
  2. We sanity-check the hooked build info with sanityCheckHookedBuildInfo.
  3. We update our PackageDescription (either freshly read or cached from LocalBuildInfo) with updatePackageDescription.

In principle, we are also supposed to update the copy of the PackageDescription stored in LocalBuildInfo at localPkgDescr. Unfortunately, in practice, there are lots of Custom setup scripts which fail to update localPkgDescr so you really shouldn't rely on it. It's not DEPRECATED because there are legitimate uses for it, but... yeah. Sharp knife. See https://github.com/haskell/cabal/issues/3606 for more information on the issue.

It is not well-specified whether or not a HookedBuildInfo applied at configure time is persistent to the LocalBuildInfo. The fact that HookedBuildInfo is passed to confHook MIGHT SUGGEST that the HookedBuildInfo is applied at this time, but actually since 9317b67e6122ab14e53f81b573bd0ecb388eca5a it has been ONLY used to create a modified package description that we check for problems: it is never actually saved to the LBI. Since HookedBuildInfo is applied monoidally to the existing build infos (and it is not an idempotent monoid), it could break things to save it, since we are obligated to apply any new HookedBuildInfo and then we'd get the effect twice. But this does mean we have to re-apply it every time. Hey, it's more flexibility.

package configuration

data GenericPackageDescription #

Instances
Eq GenericPackageDescription # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Data GenericPackageDescription # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> GenericPackageDescription -> c GenericPackageDescription #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c GenericPackageDescription #

toConstr :: GenericPackageDescription -> Constr #

dataTypeOf :: GenericPackageDescription -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c GenericPackageDescription) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c GenericPackageDescription) #

gmapT :: (forall b. Data b => b -> b) -> GenericPackageDescription -> GenericPackageDescription #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> GenericPackageDescription -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> GenericPackageDescription -> r #

gmapQ :: (forall d. Data d => d -> u) -> GenericPackageDescription -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> GenericPackageDescription -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> GenericPackageDescription -> m GenericPackageDescription #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> GenericPackageDescription -> m GenericPackageDescription #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> GenericPackageDescription -> m GenericPackageDescription #

Show GenericPackageDescription # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Generic GenericPackageDescription # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Associated Types

type Rep GenericPackageDescription :: * -> * #

Binary GenericPackageDescription # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

NFData GenericPackageDescription # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Package GenericPackageDescription # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

HasBuildInfos GenericPackageDescription # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

type Rep GenericPackageDescription # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

data Flag #

A flag can represent a feature to be included, or a way of linking a target against its dependencies, or in fact whatever you can think of.

Instances
Eq Flag # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

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

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

Data Flag # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Flag -> c Flag #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Flag #

toConstr :: Flag -> Constr #

dataTypeOf :: Flag -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Flag) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Flag) #

gmapT :: (forall b. Data b => b -> b) -> Flag -> Flag #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Flag -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Flag -> r #

gmapQ :: (forall d. Data d => d -> u) -> Flag -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Flag -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Flag -> m Flag #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Flag -> m Flag #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Flag -> m Flag #

Show Flag # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

showsPrec :: Int -> Flag -> ShowS #

show :: Flag -> String #

showList :: [Flag] -> ShowS #

Generic Flag # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Associated Types

type Rep Flag :: * -> * #

Methods

from :: Flag -> Rep Flag x #

to :: Rep Flag x -> Flag #

Binary Flag # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

put :: Flag -> Put #

get :: Get Flag #

putList :: [Flag] -> Put #

NFData Flag # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

rnf :: Flag -> () #

type Rep Flag # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

type Rep Flag = D1 (MetaData "Flag" "Distribution.Types.GenericPackageDescription" "Cabal-2.4.1.0-ALhzvdqe44A7vLWPOxSupv" False) (C1 (MetaCons "MkFlag" PrefixI True) ((S1 (MetaSel (Just "flagName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FlagName) :*: S1 (MetaSel (Just "flagDescription") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :*: (S1 (MetaSel (Just "flagDefault") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool) :*: S1 (MetaSel (Just "flagManual") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool))))

emptyFlag :: FlagName -> Flag #

A Flag initialized with default parameters.

data FlagName #

A FlagName is the name of a user-defined configuration flag

Use mkFlagName and unFlagName to convert from/to a String.

This type is opaque since Cabal-2.0

Since: 2.0.0.2

Instances
Eq FlagName # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Data FlagName # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FlagName -> c FlagName #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FlagName #

toConstr :: FlagName -> Constr #

dataTypeOf :: FlagName -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FlagName) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FlagName) #

gmapT :: (forall b. Data b => b -> b) -> FlagName -> FlagName #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FlagName -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FlagName -> r #

gmapQ :: (forall d. Data d => d -> u) -> FlagName -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> FlagName -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> FlagName -> m FlagName #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FlagName -> m FlagName #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FlagName -> m FlagName #

Ord FlagName # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Read FlagName # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Show FlagName # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

IsString FlagName #

mkFlagName

Since: 2.0.0.2

Instance details

Defined in Distribution.Types.GenericPackageDescription

Generic FlagName # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Associated Types

type Rep FlagName :: * -> * #

Methods

from :: FlagName -> Rep FlagName x #

to :: Rep FlagName x -> FlagName #

Binary FlagName # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

put :: FlagName -> Put #

get :: Get FlagName #

putList :: [FlagName] -> Put #

NFData FlagName # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

rnf :: FlagName -> () #

Pretty FlagName # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

pretty :: FlagName -> Doc #

Parsec FlagName # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

parsec :: CabalParsing m => m FlagName #

Text FlagName # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

disp :: FlagName -> Doc #

parse :: ReadP r FlagName #

type Rep FlagName # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

type Rep FlagName = D1 (MetaData "FlagName" "Distribution.Types.GenericPackageDescription" "Cabal-2.4.1.0-ALhzvdqe44A7vLWPOxSupv" True) (C1 (MetaCons "FlagName" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ShortText)))

mkFlagName :: String -> FlagName #

Construct a FlagName from a String

mkFlagName is the inverse to unFlagName

Note: No validations are performed to ensure that the resulting FlagName is valid

Since: 2.0.0.2

unFlagName :: FlagName -> String #

Convert FlagName to String

Since: 2.0.0.2

data FlagAssignment #

A FlagAssignment is a total or partial mapping of FlagNames to Bool flag values. It represents the flags chosen by the user or discovered during configuration. For example --flags=foo --flags=-bar becomes [("foo", True), ("bar", False)]

Instances
Eq FlagAssignment # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Ord FlagAssignment # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Read FlagAssignment #

Since: 2.2.0

Instance details

Defined in Distribution.Types.GenericPackageDescription

Show FlagAssignment #

Since: 2.2.0

Instance details

Defined in Distribution.Types.GenericPackageDescription

Generic FlagAssignment # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Associated Types

type Rep FlagAssignment :: * -> * #

Semigroup FlagAssignment # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Monoid FlagAssignment # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Binary FlagAssignment # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

NFData FlagAssignment # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

rnf :: FlagAssignment -> () #

type Rep FlagAssignment # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

type Rep FlagAssignment = D1 (MetaData "FlagAssignment" "Distribution.Types.GenericPackageDescription" "Cabal-2.4.1.0-ALhzvdqe44A7vLWPOxSupv" True) (C1 (MetaCons "FlagAssignment" PrefixI True) (S1 (MetaSel (Just "getFlagAssignment") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Map FlagName (Int, Bool)))))

mkFlagAssignment :: [(FlagName, Bool)] -> FlagAssignment #

Construct a FlagAssignment from a list of flag/value pairs.

If duplicate flags occur in the input list, the later entries in the list will take precedence.

Since: 2.2.0

unFlagAssignment :: FlagAssignment -> [(FlagName, Bool)] #

Deconstruct a FlagAssignment into a list of flag/value pairs.

 null (findDuplicateFlagAssignments fa) ==> (mkFlagAssignment . unFlagAssignment) fa == fa

Since: 2.2.0

nullFlagAssignment :: FlagAssignment -> Bool #

Test whether FlagAssignment is empty.

Since: 2.2.0

showFlagValue :: (FlagName, Bool) -> String #

String representation of a flag-value pair.

diffFlagAssignment :: FlagAssignment -> FlagAssignment -> FlagAssignment #

Remove all flag-assignments from the first FlagAssignment that are contained in the second FlagAssignment

NB/TODO: This currently only removes flag assignments which also match the value assignment! We should review the code which uses this operation to figure out if this it's not enough to only compare the flagnames without the values.

Since: 2.2.0

lookupFlagAssignment :: FlagName -> FlagAssignment -> Maybe Bool #

Lookup the value for a flag

Returns Nothing if the flag isn't contained in the FlagAssignment.

Since: 2.2.0

insertFlagAssignment :: FlagName -> Bool -> FlagAssignment -> FlagAssignment #

Insert or update the boolean value of a flag.

If the flag is already present in the FlagAssigment, the value will be updated and the fact that multiple values have been provided for that flag will be recorded so that a warning can be generated later on.

Since: 2.2.0

dispFlagAssignment :: FlagAssignment -> Doc #

Pretty-prints a flag assignment.

parseFlagAssignment :: ReadP r FlagAssignment #

Parses a flag assignment.

findDuplicateFlagAssignments :: FlagAssignment -> [FlagName] #

Find the FlagNames that have been listed more than once.

Since: 2.2.0

data CondTree v c a #

A CondTree is used to represent the conditional structure of a Cabal file, reflecting a syntax element subject to constraints, and then any number of sub-elements which may be enabled subject to some condition. Both a and c are usually Monoids.

To be more concrete, consider the following fragment of a Cabal file:

build-depends: base >= 4.0
if flag(extra)
    build-depends: base >= 4.2

One way to represent this is to have CondTree ConfVar [Dependency] BuildInfo. Here, condTreeData represents the actual fields which are not behind any conditional, while condTreeComponents recursively records any further fields which are behind a conditional. condTreeConstraints records the constraints (in this case, base >= 4.0) which would be applied if you use this syntax; in general, this is derived off of targetBuildInfo (perhaps a good refactoring would be to convert this into an opaque type, with a smart constructor that pre-computes the dependencies.)

Constructors

CondNode 
Instances
Functor (CondTree v c) # 
Instance details

Defined in Distribution.Types.CondTree

Methods

fmap :: (a -> b) -> CondTree v c a -> CondTree v c b #

(<$) :: a -> CondTree v c b -> CondTree v c a #

Foldable (CondTree v c) # 
Instance details

Defined in Distribution.Types.CondTree

Methods

fold :: Monoid m => CondTree v c m -> m #

foldMap :: Monoid m => (a -> m) -> CondTree v c a -> m #

foldr :: (a -> b -> b) -> b -> CondTree v c a -> b #

foldr' :: (a -> b -> b) -> b -> CondTree v c a -> b #

foldl :: (b -> a -> b) -> b -> CondTree v c a -> b #

foldl' :: (b -> a -> b) -> b -> CondTree v c a -> b #

foldr1 :: (a -> a -> a) -> CondTree v c a -> a #

foldl1 :: (a -> a -> a) -> CondTree v c a -> a #

toList :: CondTree v c a -> [a] #

null :: CondTree v c a -> Bool #

length :: CondTree v c a -> Int #

elem :: Eq a => a -> CondTree v c a -> Bool #

maximum :: Ord a => CondTree v c a -> a #

minimum :: Ord a => CondTree v c a -> a #

sum :: Num a => CondTree v c a -> a #

product :: Num a => CondTree v c a -> a #

Traversable (CondTree v c) # 
Instance details

Defined in Distribution.Types.CondTree

Methods

traverse :: Applicative f => (a -> f b) -> CondTree v c a -> f (CondTree v c b) #

sequenceA :: Applicative f => CondTree v c (f a) -> f (CondTree v c a) #

mapM :: Monad m => (a -> m b) -> CondTree v c a -> m (CondTree v c b) #

sequence :: Monad m => CondTree v c (m a) -> m (CondTree v c a) #

(Eq a, Eq c, Eq v) => Eq (CondTree v c a) # 
Instance details

Defined in Distribution.Types.CondTree

Methods

(==) :: CondTree v c a -> CondTree v c a -> Bool #

(/=) :: CondTree v c a -> CondTree v c a -> Bool #

(Data v, Data c, Data a) => Data (CondTree v c a) # 
Instance details

Defined in Distribution.Types.CondTree

Methods

gfoldl :: (forall d b. Data d => c0 (d -> b) -> d -> c0 b) -> (forall g. g -> c0 g) -> CondTree v c a -> c0 (CondTree v c a) #

gunfold :: (forall b r. Data b => c0 (b -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (CondTree v c a) #

toConstr :: CondTree v c a -> Constr #

dataTypeOf :: CondTree v c a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c0 (t d)) -> Maybe (c0 (CondTree v c a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c0 (t d e)) -> Maybe (c0 (CondTree v c a)) #

gmapT :: (forall b. Data b => b -> b) -> CondTree v c a -> CondTree v c a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> CondTree v c a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> CondTree v c a -> r #

gmapQ :: (forall d. Data d => d -> u) -> CondTree v c a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> CondTree v c a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> CondTree v c a -> m (CondTree v c a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> CondTree v c a -> m (CondTree v c a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> CondTree v c a -> m (CondTree v c a) #

(Show a, Show c, Show v) => Show (CondTree v c a) # 
Instance details

Defined in Distribution.Types.CondTree

Methods

showsPrec :: Int -> CondTree v c a -> ShowS #

show :: CondTree v c a -> String #

showList :: [CondTree v c a] -> ShowS #

Generic (CondTree v c a) # 
Instance details

Defined in Distribution.Types.CondTree

Associated Types

type Rep (CondTree v c a) :: * -> * #

Methods

from :: CondTree v c a -> Rep (CondTree v c a) x #

to :: Rep (CondTree v c a) x -> CondTree v c a #

(Binary v, Binary c, Binary a) => Binary (CondTree v c a) # 
Instance details

Defined in Distribution.Types.CondTree

Methods

put :: CondTree v c a -> Put #

get :: Get (CondTree v c a) #

putList :: [CondTree v c a] -> Put #

(NFData v, NFData c, NFData a) => NFData (CondTree v c a) # 
Instance details

Defined in Distribution.Types.CondTree

Methods

rnf :: CondTree v c a -> () #

type Rep (CondTree v c a) # 
Instance details

Defined in Distribution.Types.CondTree

type Rep (CondTree v c a) = D1 (MetaData "CondTree" "Distribution.Types.CondTree" "Cabal-2.4.1.0-ALhzvdqe44A7vLWPOxSupv" False) (C1 (MetaCons "CondNode" PrefixI True) (S1 (MetaSel (Just "condTreeData") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a) :*: (S1 (MetaSel (Just "condTreeConstraints") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 c) :*: S1 (MetaSel (Just "condTreeComponents") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [CondBranch v c a]))))

data ConfVar #

A ConfVar represents the variable type used.

Instances
Eq ConfVar # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

(==) :: ConfVar -> ConfVar -> Bool #

(/=) :: ConfVar -> ConfVar -> Bool #

Data ConfVar # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ConfVar -> c ConfVar #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c ConfVar #

toConstr :: ConfVar -> Constr #

dataTypeOf :: ConfVar -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c ConfVar) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c ConfVar) #

gmapT :: (forall b. Data b => b -> b) -> ConfVar -> ConfVar #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ConfVar -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ConfVar -> r #

gmapQ :: (forall d. Data d => d -> u) -> ConfVar -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> ConfVar -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> ConfVar -> m ConfVar #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ConfVar -> m ConfVar #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ConfVar -> m ConfVar #

Show ConfVar # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Generic ConfVar # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Associated Types

type Rep ConfVar :: * -> * #

Methods

from :: ConfVar -> Rep ConfVar x #

to :: Rep ConfVar x -> ConfVar #

Binary ConfVar # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

put :: ConfVar -> Put #

get :: Get ConfVar #

putList :: [ConfVar] -> Put #

NFData ConfVar # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

Methods

rnf :: ConfVar -> () #

type Rep ConfVar # 
Instance details

Defined in Distribution.Types.GenericPackageDescription

data Condition c #

A boolean expression parameterized over the variable type used.

Constructors

Var c 
Lit Bool 
CNot (Condition c) 
COr (Condition c) (Condition c) 
CAnd (Condition c) (Condition c) 
Instances
Monad Condition # 
Instance details

Defined in Distribution.Types.Condition

Methods

(>>=) :: Condition a -> (a -> Condition b) -> Condition b #

(>>) :: Condition a -> Condition b -> Condition b #

return :: a -> Condition a #

fail :: String -> Condition a #

Functor Condition # 
Instance details

Defined in Distribution.Types.Condition

Methods

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

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

Applicative Condition # 
Instance details

Defined in Distribution.Types.Condition

Methods

pure :: a -> Condition a #

(<*>) :: Condition (a -> b) -> Condition a -> Condition b #

liftA2 :: (a -> b -> c) -> Condition a -> Condition b -> Condition c #

(*>) :: Condition a -> Condition b -> Condition b #

(<*) :: Condition a -> Condition b -> Condition a #

Foldable Condition # 
Instance details

Defined in Distribution.Types.Condition

Methods

fold :: Monoid m => Condition m -> m #

foldMap :: Monoid m => (a -> m) -> Condition a -> m #

foldr :: (a -> b -> b) -> b -> Condition a -> b #

foldr' :: (a -> b -> b) -> b -> Condition a -> b #

foldl :: (b -> a -> b) -> b -> Condition a -> b #

foldl' :: (b -> a -> b) -> b -> Condition a -> b #

foldr1 :: (a -> a -> a) -> Condition a -> a #

foldl1 :: (a -> a -> a) -> Condition a -> a #

toList :: Condition a -> [a] #

null :: Condition a -> Bool #

length :: Condition a -> Int #

elem :: Eq a => a -> Condition a -> Bool #

maximum :: Ord a => Condition a -> a #

minimum :: Ord a => Condition a -> a #

sum :: Num a => Condition a -> a #

product :: Num a => Condition a -> a #

Traversable Condition # 
Instance details

Defined in Distribution.Types.Condition

Methods

traverse :: Applicative f => (a -> f b) -> Condition a -> f (Condition b) #

sequenceA :: Applicative f => Condition (f a) -> f (Condition a) #

mapM :: Monad m => (a -> m b) -> Condition a -> m (Condition b) #

sequence :: Monad m => Condition (m a) -> m (Condition a) #

Alternative Condition # 
Instance details

Defined in Distribution.Types.Condition

Methods

empty :: Condition a #

(<|>) :: Condition a -> Condition a -> Condition a #

some :: Condition a -> Condition [a] #

many :: Condition a -> Condition [a] #

MonadPlus Condition # 
Instance details

Defined in Distribution.Types.Condition

Methods

mzero :: Condition a #

mplus :: Condition a -> Condition a -> Condition a #

Eq c => Eq (Condition c) # 
Instance details

Defined in Distribution.Types.Condition

Methods

(==) :: Condition c -> Condition c -> Bool #

(/=) :: Condition c -> Condition c -> Bool #

Data c => Data (Condition c) # 
Instance details

Defined in Distribution.Types.Condition

Methods

gfoldl :: (forall d b. Data d => c0 (d -> b) -> d -> c0 b) -> (forall g. g -> c0 g) -> Condition c -> c0 (Condition c) #

gunfold :: (forall b r. Data b => c0 (b -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (Condition c) #

toConstr :: Condition c -> Constr #

dataTypeOf :: Condition c -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c0 (t d)) -> Maybe (c0 (Condition c)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c0 (t d e)) -> Maybe (c0 (Condition c)) #

gmapT :: (forall b. Data b => b -> b) -> Condition c -> Condition c #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Condition c -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Condition c -> r #

gmapQ :: (forall d. Data d => d -> u) -> Condition c -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Condition c -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Condition c -> m (Condition c) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Condition c -> m (Condition c) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Condition c -> m (Condition c) #

Show c => Show (Condition c) # 
Instance details

Defined in Distribution.Types.Condition

Generic (Condition c) # 
Instance details

Defined in Distribution.Types.Condition

Associated Types

type Rep (Condition c) :: * -> * #

Methods

from :: Condition c -> Rep (Condition c) x #

to :: Rep (Condition c) x -> Condition c #

Semigroup (Condition a) # 
Instance details

Defined in Distribution.Types.Condition

Methods

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

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

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

Monoid (Condition a) # 
Instance details

Defined in Distribution.Types.Condition

Binary c => Binary (Condition c) # 
Instance details

Defined in Distribution.Types.Condition

Methods

put :: Condition c -> Put #

get :: Get (Condition c) #

putList :: [Condition c] -> Put #

NFData c => NFData (Condition c) # 
Instance details

Defined in Distribution.Types.Condition

Methods

rnf :: Condition c -> () #

type Rep (Condition c) # 
Instance details

Defined in Distribution.Types.Condition

cNot :: Condition a -> Condition a #

Boolean negation of a Condition value.

cAnd :: Condition a -> Condition a -> Condition a #

Boolean AND of two Condtion values.

cOr :: Eq v => Condition v -> Condition v -> Condition v #

Boolean OR of two Condition values.

Source repositories

data SourceRepo #

Information about the source revision control system for a package.

When specifying a repo it is useful to know the meaning or intention of the information as doing so enables automation. There are two obvious common purposes: one is to find the repo for the latest development version, the other is to find the repo for this specific release. The ReopKind specifies which one we mean (or another custom one).

A package can specify one or the other kind or both. Most will specify just a head repo but some may want to specify a repo to reconstruct the sources for this package release.

The required information is the RepoType which tells us if it's using Darcs, Git for example. The repoLocation and other details are interpreted according to the repo type.

Constructors

SourceRepo 

Fields

  • repoKind :: RepoKind

    The kind of repo. This field is required.

  • repoType :: Maybe RepoType

    The type of the source repository system for this repo, eg Darcs or Git. This field is required.

  • repoLocation :: Maybe String

    The location of the repository. For most RepoTypes this is a URL. This field is required.

  • repoModule :: Maybe String

    CVS can put multiple "modules" on one server and requires a module name in addition to the location to identify a particular repo. Logically this is part of the location but unfortunately has to be specified separately. This field is required for the CVS RepoType and should not be given otherwise.

  • repoBranch :: Maybe String

    The name or identifier of the branch, if any. Many source control systems have the notion of multiple branches in a repo that exist in the same location. For example Git and CVS use this while systems like Darcs use different locations for different branches. This field is optional but should be used if necessary to identify the sources, especially for the RepoThis repo kind.

  • repoTag :: Maybe String

    The tag identify a particular state of the repository. This should be given for the RepoThis repo kind and not for RepoHead kind.

  • repoSubdir :: Maybe FilePath

    Some repositories contain multiple projects in different subdirectories This field specifies the subdirectory where this packages sources can be found, eg the subdirectory containing the .cabal file. It is interpreted relative to the root of the repository. This field is optional. If not given the default is "." ie no subdirectory.

Instances
Eq SourceRepo # 
Instance details

Defined in Distribution.Types.SourceRepo

Data SourceRepo # 
Instance details

Defined in Distribution.Types.SourceRepo

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SourceRepo -> c SourceRepo #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SourceRepo #

toConstr :: SourceRepo -> Constr #

dataTypeOf :: SourceRepo -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SourceRepo) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SourceRepo) #

gmapT :: (forall b. Data b => b -> b) -> SourceRepo -> SourceRepo #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SourceRepo -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SourceRepo -> r #

gmapQ :: (forall d. Data d => d -> u) -> SourceRepo -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SourceRepo -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SourceRepo -> m SourceRepo #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceRepo -> m SourceRepo #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SourceRepo -> m SourceRepo #

Ord SourceRepo # 
Instance details

Defined in Distribution.Types.SourceRepo

Read SourceRepo # 
Instance details

Defined in Distribution.Types.SourceRepo

Show SourceRepo # 
Instance details

Defined in Distribution.Types.SourceRepo

Generic SourceRepo # 
Instance details

Defined in Distribution.Types.SourceRepo

Associated Types

type Rep SourceRepo :: * -> * #

Binary SourceRepo # 
Instance details

Defined in Distribution.Types.SourceRepo

NFData SourceRepo # 
Instance details

Defined in Distribution.Types.SourceRepo

Methods

rnf :: SourceRepo -> () #

type Rep SourceRepo # 
Instance details

Defined in Distribution.Types.SourceRepo

data RepoKind #

What this repo info is for, what it represents.

Constructors

RepoHead

The repository for the "head" or development version of the project. This repo is where we should track the latest development activity or the usual repo people should get to contribute patches.

RepoThis

The repository containing the sources for this exact package version or release. For this kind of repo a tag should be given to give enough information to re-create the exact sources.

RepoKindUnknown String 
Instances
Eq RepoKind # 
Instance details

Defined in Distribution.Types.SourceRepo

Data RepoKind # 
Instance details

Defined in Distribution.Types.SourceRepo

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RepoKind -> c RepoKind #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RepoKind #

toConstr :: RepoKind -> Constr #

dataTypeOf :: RepoKind -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RepoKind) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RepoKind) #

gmapT :: (forall b. Data b => b -> b) -> RepoKind -> RepoKind #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RepoKind -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RepoKind -> r #

gmapQ :: (forall d. Data d => d -> u) -> RepoKind -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RepoKind -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RepoKind -> m RepoKind #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RepoKind -> m RepoKind #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RepoKind -> m RepoKind #

Ord RepoKind # 
Instance details

Defined in Distribution.Types.SourceRepo

Read RepoKind # 
Instance details

Defined in Distribution.Types.SourceRepo

Show RepoKind # 
Instance details

Defined in Distribution.Types.SourceRepo

Generic RepoKind # 
Instance details

Defined in Distribution.Types.SourceRepo

Associated Types

type Rep RepoKind :: * -> * #

Methods

from :: RepoKind -> Rep RepoKind x #

to :: Rep RepoKind x -> RepoKind #

Binary RepoKind # 
Instance details

Defined in Distribution.Types.SourceRepo

Methods

put :: RepoKind -> Put #

get :: Get RepoKind #

putList :: [RepoKind] -> Put #

NFData RepoKind # 
Instance details

Defined in Distribution.Types.SourceRepo

Methods

rnf :: RepoKind -> () #

Pretty RepoKind # 
Instance details

Defined in Distribution.Types.SourceRepo

Methods

pretty :: RepoKind -> Doc #

Parsec RepoKind # 
Instance details

Defined in Distribution.Types.SourceRepo

Methods

parsec :: CabalParsing m => m RepoKind #

Text RepoKind # 
Instance details

Defined in Distribution.Types.SourceRepo

Methods

disp :: RepoKind -> Doc #

parse :: ReadP r RepoKind #

type Rep RepoKind # 
Instance details

Defined in Distribution.Types.SourceRepo

type Rep RepoKind = D1 (MetaData "RepoKind" "Distribution.Types.SourceRepo" "Cabal-2.4.1.0-ALhzvdqe44A7vLWPOxSupv" False) (C1 (MetaCons "RepoHead" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "RepoThis" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "RepoKindUnknown" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))))

data RepoType #

An enumeration of common source control systems. The fields used in the SourceRepo depend on the type of repo. The tools and methods used to obtain and track the repo depend on the repo type.

Instances
Eq RepoType # 
Instance details

Defined in Distribution.Types.SourceRepo

Data RepoType # 
Instance details

Defined in Distribution.Types.SourceRepo

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> RepoType -> c RepoType #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c RepoType #

toConstr :: RepoType -> Constr #

dataTypeOf :: RepoType -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c RepoType) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c RepoType) #

gmapT :: (forall b. Data b => b -> b) -> RepoType -> RepoType #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> RepoType -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> RepoType -> r #

gmapQ :: (forall d. Data d => d -> u) -> RepoType -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> RepoType -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> RepoType -> m RepoType #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> RepoType -> m RepoType #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> RepoType -> m RepoType #

Ord RepoType # 
Instance details

Defined in Distribution.Types.SourceRepo

Read RepoType # 
Instance details

Defined in Distribution.Types.SourceRepo

Show RepoType # 
Instance details

Defined in Distribution.Types.SourceRepo

Generic RepoType # 
Instance details

Defined in Distribution.Types.SourceRepo

Associated Types

type Rep RepoType :: * -> * #

Methods

from :: RepoType -> Rep RepoType x #

to :: Rep RepoType x -> RepoType #

Binary RepoType # 
Instance details

Defined in Distribution.Types.SourceRepo

Methods

put :: RepoType -> Put #

get :: Get RepoType #

putList :: [RepoType] -> Put #

NFData RepoType # 
Instance details

Defined in Distribution.Types.SourceRepo

Methods

rnf :: RepoType -> () #

Pretty RepoType # 
Instance details

Defined in Distribution.Types.SourceRepo

Methods

pretty :: RepoType -> Doc #

Parsec RepoType # 
Instance details

Defined in Distribution.Types.SourceRepo

Methods

parsec :: CabalParsing m => m RepoType #

Text RepoType # 
Instance details

Defined in Distribution.Types.SourceRepo

Methods

disp :: RepoType -> Doc #

parse :: ReadP r RepoType #

type Rep RepoType # 
Instance details

Defined in Distribution.Types.SourceRepo

type Rep RepoType = D1 (MetaData "RepoType" "Distribution.Types.SourceRepo" "Cabal-2.4.1.0-ALhzvdqe44A7vLWPOxSupv" False) (((C1 (MetaCons "Darcs" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "Git" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "SVN" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "CVS" PrefixI False) (U1 :: * -> *))) :+: ((C1 (MetaCons "Mercurial" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "GnuArch" PrefixI False) (U1 :: * -> *)) :+: (C1 (MetaCons "Bazaar" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "Monotone" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "OtherRepoType" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))))))

Custom setup build information

data SetupBuildInfo #

Constructors

SetupBuildInfo 

Fields

  • setupDepends :: [Dependency]
     
  • defaultSetupDepends :: Bool

    Is this a default 'custom-setup' section added by the cabal-install code (as opposed to user-provided)? This field is only used internally, and doesn't correspond to anything in the .cabal file. See #3199.

Instances
Eq SetupBuildInfo # 
Instance details

Defined in Distribution.Types.SetupBuildInfo

Data SetupBuildInfo # 
Instance details

Defined in Distribution.Types.SetupBuildInfo

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> SetupBuildInfo -> c SetupBuildInfo #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c SetupBuildInfo #

toConstr :: SetupBuildInfo -> Constr #

dataTypeOf :: SetupBuildInfo -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c SetupBuildInfo) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c SetupBuildInfo) #

gmapT :: (forall b. Data b => b -> b) -> SetupBuildInfo -> SetupBuildInfo #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> SetupBuildInfo -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> SetupBuildInfo -> r #

gmapQ :: (forall d. Data d => d -> u) -> SetupBuildInfo -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> SetupBuildInfo -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> SetupBuildInfo -> m SetupBuildInfo #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> SetupBuildInfo -> m SetupBuildInfo #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> SetupBuildInfo -> m SetupBuildInfo #

Read SetupBuildInfo # 
Instance details

Defined in Distribution.Types.SetupBuildInfo

Show SetupBuildInfo # 
Instance details

Defined in Distribution.Types.SetupBuildInfo

Generic SetupBuildInfo # 
Instance details

Defined in Distribution.Types.SetupBuildInfo

Associated Types

type Rep SetupBuildInfo :: * -> * #

Semigroup SetupBuildInfo # 
Instance details

Defined in Distribution.Types.SetupBuildInfo

Monoid SetupBuildInfo # 
Instance details

Defined in Distribution.Types.SetupBuildInfo

Binary SetupBuildInfo # 
Instance details

Defined in Distribution.Types.SetupBuildInfo

NFData SetupBuildInfo # 
Instance details

Defined in Distribution.Types.SetupBuildInfo

Methods

rnf :: SetupBuildInfo -> () #

type Rep SetupBuildInfo # 
Instance details

Defined in Distribution.Types.SetupBuildInfo

type Rep SetupBuildInfo = D1 (MetaData "SetupBuildInfo" "Distribution.Types.SetupBuildInfo" "Cabal-2.4.1.0-ALhzvdqe44A7vLWPOxSupv" False) (C1 (MetaCons "SetupBuildInfo" PrefixI True) (S1 (MetaSel (Just "setupDepends") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Dependency]) :*: S1 (MetaSel (Just "defaultSetupDepends") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)))