Distribution.Types.BuildInfo

Cabal-3.2.1.0: A framework for packaging Haskell software

Safe Haskell | None
Language | Haskell2010

Distribution.Types.BuildInfo

Synopsis

- data BuildInfo = BuildInfo {
  - buildable :: Bool
  - buildTools :: [LegacyExeDependency]
  - buildToolDepends :: [ExeDependency]
  - cppOptions :: [String]
  - asmOptions :: [String]
  - cmmOptions :: [String]
  - ccOptions :: [String]
  - cxxOptions :: [String]
  - ldOptions :: [String]
  - pkgconfigDepends :: [PkgconfigDependency]
  - frameworks :: [String]
  - extraFrameworkDirs :: [String]
  - asmSources :: [FilePath]
  - cmmSources :: [FilePath]
  - cSources :: [FilePath]
  - cxxSources :: [FilePath]
  - jsSources :: [FilePath]
  - hsSourceDirs :: [FilePath]
  - otherModules :: [ModuleName]
  - virtualModules :: [ModuleName]
  - autogenModules :: [ModuleName]
  - defaultLanguage :: Maybe Language
  - otherLanguages :: [Language]
  - defaultExtensions :: [Extension]
  - otherExtensions :: [Extension]
  - oldExtensions :: [Extension]
  - extraLibs :: [String]
  - extraGHCiLibs :: [String]
  - extraBundledLibs :: [String]
  - extraLibFlavours :: [String]
  - extraDynLibFlavours :: [String]
  - extraLibDirs :: [String]
  - includeDirs :: [FilePath]
  - includes :: [FilePath]
  - autogenIncludes :: [FilePath]
  - installIncludes :: [FilePath]
  - options :: PerCompilerFlavor [String]
  - profOptions :: PerCompilerFlavor [String]
  - sharedOptions :: PerCompilerFlavor [String]
  - staticOptions :: PerCompilerFlavor [String]
  - customFieldsBI :: [(String, String)]
  - targetBuildDepends :: [Dependency]
  - mixins :: [Mixin]
  }
- emptyBuildInfo :: BuildInfo
- allLanguages :: BuildInfo -> [Language]
- allExtensions :: BuildInfo -> [Extension]
- usedExtensions :: BuildInfo -> [Extension]
- usesTemplateHaskellOrQQ :: BuildInfo -> Bool
- hcOptions :: CompilerFlavor -> BuildInfo -> [String]
- hcProfOptions :: CompilerFlavor -> BuildInfo -> [String]
- hcSharedOptions :: CompilerFlavor -> BuildInfo -> [String]
- hcStaticOptions :: CompilerFlavor -> BuildInfo -> [String]

# Documentation

data BuildInfo #

Constructors

BuildInfo |
Fields buildable :: Bool component is buildable here buildTools :: [LegacyExeDependency] Tools needed to build this bit. This is a legacy field that `buildToolDepends` largely supersedes. Unless use are very sure what you are doing, use the functions in Distribution.Simple.BuildToolDepends rather than accessing this field directly. buildToolDepends :: [ExeDependency] Haskell tools needed to build this bit This field is better than `buildTools` because it allows one to precisely specify an executable in a package. Unless use are very sure what you are doing, use the functions in Distribution.Simple.BuildToolDepends rather than accessing this field directly. cppOptions :: [String] options for pre-processing Haskell code asmOptions :: [String] options for assmebler cmmOptions :: [String] options for C-- compiler ccOptions :: [String] options for C compiler cxxOptions :: [String] options for C++ compiler ldOptions :: [String] options for linker pkgconfigDepends :: [PkgconfigDependency] pkg-config packages that are used frameworks :: [String] support frameworks for Mac OS X extraFrameworkDirs :: [String] extra locations to find frameworks. asmSources :: [FilePath] Assembly files. cmmSources :: [FilePath] C-- files. cSources :: [FilePath] cxxSources :: [FilePath] jsSources :: [FilePath] hsSourceDirs :: [FilePath] where to look for the Haskell module hierarchy otherModules :: [ModuleName] non-exposed or non-main modules virtualModules :: [ModuleName] exposed modules that do not have a source file (e.g. `GHC.Prim` from `ghc-prim` package) autogenModules :: [ModuleName] not present on sdist, Paths_* or user-generated with a custom Setup.hs defaultLanguage :: Maybe Language language used when not explicitly specified otherLanguages :: [Language] other languages used within the package defaultExtensions :: [Extension] language extensions used by all modules otherExtensions :: [Extension] other language extensions used within the package oldExtensions :: [Extension] the old extensions field, treated same as `defaultExtensions` extraLibs :: [String] what libraries to link with when compiling a program that uses your package extraGHCiLibs :: [String] if present, overrides extraLibs when package is loaded with GHCi. extraBundledLibs :: [String] if present, adds libs to hs-libraries, which become part of the package. Example: the Cffi library shipping with the rts, alognside the HSrts-1.0.a,.o,... Example 2: a library that is being built by a foreing tool (e.g. rust) and copied and registered together with this library. The logic on how this library is built will have to be encoded in a custom Setup for now. Otherwise cabal would need to lear how to call arbitrary library builders. extraLibFlavours :: [String] Hidden Flag. This set of strings, will be appended to all libraries when copying. E.g. [libHSname_flavour | flavour <- extraLibFlavours]. This should only be needed in very specific cases, e.g. the `rts` package, where there are multiple copies of slightly differently built libs. extraDynLibFlavours :: [String] Hidden Flag. This set of strings will be be appended to all dynamic libraries when copying. This is particularly useful with the `rts` package, where we want different dynamic flavours of the RTS library to be installed. extraLibDirs :: [String] includeDirs :: [FilePath] directories to find .h files includes :: [FilePath] The .h files to be found in includeDirs autogenIncludes :: [FilePath] The .h files to be generated (e.g. by `autoconf`) installIncludes :: [FilePath] .h files to install with the package options :: PerCompilerFlavor [String] profOptions :: PerCompilerFlavor [String] sharedOptions :: PerCompilerFlavor [String] staticOptions :: PerCompilerFlavor [String] customFieldsBI :: [(String, String)] Custom fields starting with x-, stored in a simple assoc-list. targetBuildDepends :: [Dependency] Dependencies specific to a library or executable target mixins :: [Mixin]

#### Instances

Instances details

Eq BuildInfo # |
Instance details Defined in Distribution.Types.BuildInfo Methods (==) :: BuildInfo -> BuildInfo -> Bool # (/=) :: BuildInfo -> BuildInfo -> Bool #
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 Source # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c BuildInfo Source # toConstr :: BuildInfo -> Constr Source # dataTypeOf :: BuildInfo -> DataType Source # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c BuildInfo) Source # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c BuildInfo) Source # gmapT :: (forall b. Data b => b -> b) -> BuildInfo -> BuildInfo Source # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> BuildInfo -> r Source # gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> BuildInfo -> r Source # gmapQ :: (forall d. Data d => d -> u) -> BuildInfo -> [u] Source # gmapQi :: Int -> (forall d. Data d => d -> u) -> BuildInfo -> u Source # gmapM :: Monad m => (forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo Source # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo Source # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> BuildInfo -> m BuildInfo Source #
Read BuildInfo # |
Instance details Defined in Distribution.Types.BuildInfo Methods readsPrec :: Int -> ReadS BuildInfo Source # readList :: ReadS [BuildInfo] Source # readPrec :: ReadPrec BuildInfo Source # readListPrec :: ReadPrec [BuildInfo] Source #
Show BuildInfo # |
Instance details Defined in Distribution.Types.BuildInfo Methods showsPrec :: Int -> BuildInfo -> ShowS Source # show :: BuildInfo -> String Source # showList :: [BuildInfo] -> ShowS Source #
Generic BuildInfo # |
Instance details Defined in Distribution.Types.BuildInfo Associated Types type Rep BuildInfo :: Type -> Type Source # Methods from :: BuildInfo -> Rep BuildInfo x Source # to :: Rep BuildInfo x -> BuildInfo Source #
Semigroup BuildInfo # |
Instance details Defined in Distribution.Types.BuildInfo Methods (<>) :: BuildInfo -> BuildInfo -> BuildInfo Source # sconcat :: NonEmpty BuildInfo -> BuildInfo Source # stimes :: Integral b => b -> BuildInfo -> BuildInfo Source #
Monoid BuildInfo # |
Instance details Defined in Distribution.Types.BuildInfo Methods mempty :: BuildInfo Source # mappend :: BuildInfo -> BuildInfo -> BuildInfo Source # mconcat :: [BuildInfo] -> BuildInfo Source #
Binary BuildInfo # |
Instance details Defined in Distribution.Types.BuildInfo Methods put :: BuildInfo -> Put Source # get :: Get BuildInfo Source # putList :: [BuildInfo] -> Put Source #
NFData BuildInfo # |
Instance details Defined in Distribution.Types.BuildInfo Methods rnf :: BuildInfo -> () Source #
Structured BuildInfo # |
Instance details Defined in Distribution.Types.BuildInfo Methods structure :: Proxy BuildInfo -> Structure # structureHash' :: Tagged BuildInfo MD5
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] # extraDynLibFlavours :: Lens' BuildInfo [String] # extraLibDirs :: Lens' BuildInfo [String] # includeDirs :: Lens' BuildInfo [FilePath] # includes :: Lens' BuildInfo [FilePath] # autogenIncludes :: Lens' BuildInfo [FilePath] # installIncludes :: Lens' BuildInfo [FilePath] # options :: Lens' BuildInfo (PerCompilerFlavor [String]) # profOptions :: Lens' BuildInfo (PerCompilerFlavor [String]) # sharedOptions :: Lens' BuildInfo (PerCompilerFlavor [String]) # staticOptions :: Lens' BuildInfo (PerCompilerFlavor [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-3.2.1.0" '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 "extraDynLibFlavours") '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 "autogenIncludes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath]) :*: (S1 ('MetaSel ('Just "installIncludes") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [FilePath]) :*: S1 ('MetaSel ('Just "options") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PerCompilerFlavor [String]))))) :*: ((S1 ('MetaSel ('Just "profOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PerCompilerFlavor [String])) :*: (S1 ('MetaSel ('Just "sharedOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PerCompilerFlavor [String])) :*: S1 ('MetaSel ('Just "staticOptions") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (PerCompilerFlavor [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]))))))))

emptyBuildInfo :: BuildInfo #

allLanguages :: BuildInfo -> [Language] #

The `Language`s used by this component

allExtensions :: BuildInfo -> [Extension] #

The `Extension`s 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.

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

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

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