-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | API for the Hooks build-type -- -- User-facing API for the Hooks build-type. @package Cabal-hooks @version 3.16 -- | This module defines the interface for the Hooks -- build-type. -- -- To write a package that implements build-type: Hooks, you -- should define a module SetupHooks.hs which exports a value -- setupHooks :: SetupHooks. This is a record that -- declares actions that should be hooked into the cabal build process. -- -- See SetupHooks for more details. module Distribution.Simple.SetupHooks -- | Hooks into the cabal build phases. -- -- Usage: -- --
-- myRules :: Rules env
-- myRules = rules (static ()) $ \ env -> do { .. } -- use the monadic API here
--
rules :: StaticPtr label -> (env -> RulesM ()) -> Rules env
-- | An empty collection of rules.
noRules :: RulesM ()
type Rule = RuleData 'User
-- | A dependency of a rule.
data Dependency
-- | A dependency on an output of another rule.
RuleDependency :: !RuleOutput -> Dependency
-- | A direct dependency on a file at a particular location on disk.
--
-- This should not be used for files that are generated by other rules;
-- use RuleDependency instead.
FileDependency :: !Location -> Dependency
-- | A reference to an output of another rule.
data RuleOutput
RuleOutput :: !RuleId -> !Word -> RuleOutput
-- | which rule's outputs are we referring to?
[outputOfRule] :: RuleOutput -> !RuleId
-- | which particular output of that rule?
[outputIndex] :: RuleOutput -> !Word
-- | A unique identifier for a Rule.
data RuleId
-- | A rule with static dependencies.
--
-- Prefer using this smart constructor instead of Rule whenever
-- possible.
staticRule :: Typeable arg => Command arg (IO ()) -> [Dependency] -> NonEmpty Location -> Rule
-- | A rule with dynamic dependencies.
--
-- Prefer using this smart constructor instead of Rule whenever
-- possible.
dynamicRule :: (Typeable depsArg, Typeable depsRes, Typeable arg) => StaticPtr (Dict (Binary depsRes, Show depsRes, Eq depsRes)) -> Command depsArg (IO ([Dependency], depsRes)) -> Command arg (depsRes -> IO ()) -> [Dependency] -> NonEmpty Location -> Rule
-- | A (fully resolved) location of a dependency or result of a rule,
-- consisting of a base directory and of a file path relative to that
-- base directory path.
--
-- In practice, this will be something like Location dir
-- (moduleNameSymbolicPath mod . "hs"), where:
--
--
-- (simpleProgram "foo") { programFindLocation = ... , programFindVersion ... }
--
simpleProgram :: String -> Program
data Verbosity
data Compiler
Compiler :: CompilerId -> AbiTag -> [CompilerId] -> [(Language, CompilerFlag)] -> [(Extension, Maybe CompilerFlag)] -> Map String String -> Compiler
-- | Compiler flavour and version.
[compilerId] :: Compiler -> CompilerId
-- | Tag for distinguishing incompatible ABI's on the same architecture/os.
[compilerAbiTag] :: Compiler -> AbiTag
-- | Other implementations that this compiler claims to be compatible with.
[compilerCompat] :: Compiler -> [CompilerId]
-- | Supported language standards.
[compilerLanguages] :: Compiler -> [(Language, CompilerFlag)]
-- | Supported extensions.
[compilerExtensions] :: Compiler -> [(Extension, Maybe CompilerFlag)]
-- | A key-value map for properties not covered by the above fields.
[compilerProperties] :: Compiler -> Map String String
data Platform
Platform :: Arch -> OS -> Platform
-- | A suffix (or file extension).
--
-- Mostly used to decide which preprocessor to use, e.g. files with
-- suffix "y" are usually processed by the "happy"
-- build tool.
newtype Suffix
Suffix :: String -> Suffix
-- | LocalBuildConfig contains options that can be controlled by the
-- user and serve as inputs to the configuration of a package.
data LocalBuildConfig
-- | Data cached after configuration step. See also ConfigFlags.
data LocalBuildInfo
-- | PackageBuildDescr contains the information Cabal determines
-- after performing package-wide configuration of a package, before doing
-- any per-component configuration.
data PackageBuildDescr
-- | 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.
data PackageDescription
PackageDescription :: CabalSpecVersion -> PackageIdentifier -> Either License License -> [RelativePath Pkg 'File] -> !ShortText -> !ShortText -> !ShortText -> !ShortText -> [(CompilerFlavor, VersionRange)] -> !ShortText -> !ShortText -> !ShortText -> [SourceRepo] -> !ShortText -> !ShortText -> !ShortText -> [(String, String)] -> Maybe BuildType -> Maybe SetupBuildInfo -> Maybe Library -> [Library] -> [Executable] -> [ForeignLib] -> [TestSuite] -> [Benchmark] -> [RelativePath DataDir 'File] -> SymbolicPath Pkg ('Dir DataDir) -> [RelativePath Pkg 'File] -> [RelativePath Pkg 'File] -> [RelativePath Pkg 'File] -> [RelativePath Pkg 'File] -> PackageDescription
-- | The version of the Cabal spec that this package description uses.
[specVersion] :: PackageDescription -> CabalSpecVersion
[package] :: PackageDescription -> PackageIdentifier
[licenseRaw] :: PackageDescription -> Either License License
[licenseFiles] :: PackageDescription -> [RelativePath Pkg 'File]
[copyright] :: PackageDescription -> !ShortText
[maintainer] :: PackageDescription -> !ShortText
[author] :: PackageDescription -> !ShortText
[stability] :: PackageDescription -> !ShortText
[testedWith] :: PackageDescription -> [(CompilerFlavor, VersionRange)]
[homepage] :: PackageDescription -> !ShortText
[pkgUrl] :: PackageDescription -> !ShortText
[bugReports] :: PackageDescription -> !ShortText
[sourceRepos] :: PackageDescription -> [SourceRepo]
-- | A one-line summary of this package
[synopsis] :: PackageDescription -> !ShortText
-- | A more verbose description of this package
[description] :: PackageDescription -> !ShortText
[category] :: PackageDescription -> !ShortText
-- | Custom fields starting with x-, stored in a simple assoc-list.
[customFieldsPD] :: PackageDescription -> [(String, String)]
-- | The original build-type value as parsed from the
-- .cabal file without defaulting. See also buildType.
[buildTypeRaw] :: PackageDescription -> Maybe BuildType
[setupBuildInfo] :: PackageDescription -> Maybe SetupBuildInfo
[library] :: PackageDescription -> Maybe Library
[subLibraries] :: PackageDescription -> [Library]
[executables] :: PackageDescription -> [Executable]
[foreignLibs] :: PackageDescription -> [ForeignLib]
[testSuites] :: PackageDescription -> [TestSuite]
[benchmarks] :: PackageDescription -> [Benchmark]
-- | data file globs, relative to data directory
[dataFiles] :: PackageDescription -> [RelativePath DataDir 'File]
-- | data directory (may be absolute, or relative to package)
[dataDir] :: PackageDescription -> SymbolicPath Pkg ('Dir DataDir)
[extraSrcFiles] :: PackageDescription -> [RelativePath Pkg 'File]
[extraTmpFiles] :: PackageDescription -> [RelativePath Pkg 'File]
[extraDocFiles] :: PackageDescription -> [RelativePath Pkg 'File]
[extraFiles] :: PackageDescription -> [RelativePath Pkg 'File]
data Component
CLib :: Library -> Component
CFLib :: ForeignLib -> Component
CExe :: Executable -> Component
CTest :: TestSuite -> Component
CBench :: Benchmark -> Component
data ComponentName
CLibName :: LibraryName -> ComponentName
CNotLibName :: NotLibComponentName -> ComponentName
pattern CBenchName :: UnqualComponentName -> ComponentName
pattern CTestName :: UnqualComponentName -> ComponentName
pattern CExeName :: UnqualComponentName -> ComponentName
pattern CFLibName :: UnqualComponentName -> ComponentName
componentName :: Component -> ComponentName
data BuildInfo
BuildInfo :: Bool -> [LegacyExeDependency] -> [ExeDependency] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [PkgconfigDependency] -> [RelativePath Framework 'File] -> [SymbolicPath Pkg ('Dir Framework)] -> [SymbolicPath Pkg 'File] -> [SymbolicPath Pkg 'File] -> [SymbolicPath Pkg 'File] -> [SymbolicPath Pkg 'File] -> [SymbolicPath Pkg 'File] -> [SymbolicPath Pkg ('Dir Source)] -> [ModuleName] -> [ModuleName] -> [ModuleName] -> Maybe Language -> [Language] -> [Extension] -> [Extension] -> [Extension] -> [String] -> [String] -> [String] -> [String] -> [String] -> [String] -> [SymbolicPath Pkg ('Dir Lib)] -> [SymbolicPath Pkg ('Dir Lib)] -> [SymbolicPath Pkg ('Dir Include)] -> [SymbolicPath Include 'File] -> [RelativePath Include 'File] -> [RelativePath Include 'File] -> PerCompilerFlavor [String] -> PerCompilerFlavor [String] -> PerCompilerFlavor [String] -> PerCompilerFlavor [String] -> PerCompilerFlavor [String] -> [(String, String)] -> [Dependency] -> [Mixin] -> BuildInfo
-- | component is buildable here
[buildable] :: BuildInfo -> Bool
-- | 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.
[buildTools] :: BuildInfo -> [LegacyExeDependency]
-- | 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.
[buildToolDepends] :: BuildInfo -> [ExeDependency]
-- | options for pre-processing Haskell code
[cppOptions] :: BuildInfo -> [String]
-- | options for assembler
[asmOptions] :: BuildInfo -> [String]
-- | options for C-- compiler
[cmmOptions] :: BuildInfo -> [String]
-- | options for C compiler
[ccOptions] :: BuildInfo -> [String]
-- | options for C++ compiler
[cxxOptions] :: BuildInfo -> [String]
-- | options for pre-processing JavaScript code @since 3.16.0.0
[jsppOptions] :: BuildInfo -> [String]
-- | options for linker
[ldOptions] :: BuildInfo -> [String]
-- | options for hsc2hs
[hsc2hsOptions] :: BuildInfo -> [String]
-- | pkg-config packages that are used
[pkgconfigDepends] :: BuildInfo -> [PkgconfigDependency]
-- | support frameworks for Mac OS X
[frameworks] :: BuildInfo -> [RelativePath Framework 'File]
-- | extra locations to find frameworks.
[extraFrameworkDirs] :: BuildInfo -> [SymbolicPath Pkg ('Dir Framework)]
-- | Assembly files.
[asmSources] :: BuildInfo -> [SymbolicPath Pkg 'File]
-- | C-- files.
[cmmSources] :: BuildInfo -> [SymbolicPath Pkg 'File]
[cSources] :: BuildInfo -> [SymbolicPath Pkg 'File]
[cxxSources] :: BuildInfo -> [SymbolicPath Pkg 'File]
[jsSources] :: BuildInfo -> [SymbolicPath Pkg 'File]
-- | where to look for the Haskell module hierarchy
[hsSourceDirs] :: BuildInfo -> [SymbolicPath Pkg ('Dir Source)]
-- | non-exposed or non-main modules
[otherModules] :: BuildInfo -> [ModuleName]
-- | exposed modules that do not have a source file (e.g. GHC.Prim
-- from ghc-prim package)
[virtualModules] :: BuildInfo -> [ModuleName]
-- | not present on sdist, Paths_* or user-generated with a custom Setup.hs
[autogenModules] :: BuildInfo -> [ModuleName]
-- | language used when not explicitly specified
[defaultLanguage] :: BuildInfo -> Maybe Language
-- | other languages used within the package
[otherLanguages] :: BuildInfo -> [Language]
-- | language extensions used by all modules
[defaultExtensions] :: BuildInfo -> [Extension]
-- | other language extensions used within the package
[otherExtensions] :: BuildInfo -> [Extension]
-- | the old extensions field, treated same as defaultExtensions
[oldExtensions] :: BuildInfo -> [Extension]
-- | what libraries to link with when compiling a program that uses your
-- package
[extraLibs] :: BuildInfo -> [String]
-- | what libraries to link with when compiling a program fully statically
-- that uses your package
[extraLibsStatic] :: BuildInfo -> [String]
-- | if present, overrides extraLibs when package is loaded with GHCi.
[extraGHCiLibs] :: BuildInfo -> [String]
-- | if present, adds libs to hs-libraries, which become part of the
-- package. Example 1: the Cffi library shipping with the rts, alongside
-- the HSrts-1.0.a,.o,... Example 2: a library that is being built by a
-- foreign 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 learn
-- how to call arbitrary library builders.
[extraBundledLibs] :: BuildInfo -> [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.
[extraLibFlavours] :: BuildInfo -> [String]
-- | Hidden Flag. This set of strings will 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.
[extraDynLibFlavours] :: BuildInfo -> [String]
[extraLibDirs] :: BuildInfo -> [SymbolicPath Pkg ('Dir Lib)]
[extraLibDirsStatic] :: BuildInfo -> [SymbolicPath Pkg ('Dir Lib)]
-- | directories to find .h files
[includeDirs] :: BuildInfo -> [SymbolicPath Pkg ('Dir Include)]
-- | The .h files to be found in includeDirs
[includes] :: BuildInfo -> [SymbolicPath Include 'File]
-- | The .h files to be generated (e.g. by autoconf)
[autogenIncludes] :: BuildInfo -> [RelativePath Include 'File]
-- | .h files to install with the package
[installIncludes] :: BuildInfo -> [RelativePath Include 'File]
[options] :: BuildInfo -> PerCompilerFlavor [String]
[profOptions] :: BuildInfo -> PerCompilerFlavor [String]
[sharedOptions] :: BuildInfo -> PerCompilerFlavor [String]
[profSharedOptions] :: BuildInfo -> PerCompilerFlavor [String]
[staticOptions] :: BuildInfo -> PerCompilerFlavor [String]
-- | Custom fields starting with x-, stored in a simple assoc-list.
[customFieldsBI] :: BuildInfo -> [(String, String)]
-- | Dependencies specific to a library or executable target
[targetBuildDepends] :: BuildInfo -> [Dependency]
[mixins] :: BuildInfo -> [Mixin]
emptyBuildInfo :: BuildInfo
-- | The TargetInfo contains all the information necessary to build
-- a specific target (e.g., componentmodulefile) in a package. In
-- principle, one can get the Component from a
-- ComponentLocalBuildInfo and LocalBuildInfo, but it is
-- much more convenient to have the component in hand.
data TargetInfo
TargetInfo :: ComponentLocalBuildInfo -> Component -> TargetInfo
[targetCLBI] :: TargetInfo -> ComponentLocalBuildInfo
[targetComponent] :: TargetInfo -> Component
-- | The first five fields are common across all algebraic variants.
data ComponentLocalBuildInfo
LibComponentLocalBuildInfo :: ComponentName -> ComponentId -> UnitId -> Bool -> [(ModuleName, OpenModule)] -> [(UnitId, MungedPackageId)] -> [(OpenUnitId, ModuleRenaming)] -> [UnitId] -> [UnitId] -> String -> MungedPackageName -> [ExposedModule] -> Bool -> ComponentLocalBuildInfo
-- | It would be very convenient to store the literal Library here, but if
-- we do that, it will get serialized (via the Binary) instance twice. So
-- instead we just provide the ComponentName, which can be used to find
-- the Component in the PackageDescription. NB: eventually, this will NOT
-- uniquely identify the ComponentLocalBuildInfo.
[componentLocalName] :: ComponentLocalBuildInfo -> ComponentName
-- | The computed ComponentId of this component.
[componentComponentId] :: ComponentLocalBuildInfo -> ComponentId
-- | The computed UnitId which uniquely identifies this component.
-- Might be hashed.
[componentUnitId] :: ComponentLocalBuildInfo -> UnitId
-- | Is this an indefinite component (i.e. has unfilled holes)?
[componentIsIndefinite_] :: ComponentLocalBuildInfo -> Bool
-- | How the component was instantiated
[componentInstantiatedWith] :: ComponentLocalBuildInfo -> [(ModuleName, OpenModule)]
-- | Resolved internal and external package dependencies for this
-- component. The BuildInfo specifies a set of build
-- dependencies that must be satisfied in terms of version ranges. This
-- field fixes those dependencies to the specific versions available on
-- this machine for this compiler.
[componentPackageDeps] :: ComponentLocalBuildInfo -> [(UnitId, MungedPackageId)]
-- | The set of packages that are brought into scope during compilation,
-- including a ModuleRenaming which may used to hide or rename
-- modules. This is what gets translated into -package-id
-- arguments. This is a modernized version of
-- componentPackageDeps, which is kept around for BC purposes.
[componentIncludes] :: ComponentLocalBuildInfo -> [(OpenUnitId, ModuleRenaming)]
[componentExeDeps] :: ComponentLocalBuildInfo -> [UnitId]
-- | The internal dependencies which induce a graph on the
-- ComponentLocalBuildInfo of this package. This does NOT coincide
-- with componentPackageDeps because it ALSO records 'build-tool'
-- dependencies on executables. Maybe one day cabal-install will
-- also handle these correctly too!
[componentInternalDeps] :: ComponentLocalBuildInfo -> [UnitId]
-- | Compatibility "package key" that we pass to older versions of GHC.
[componentCompatPackageKey] :: ComponentLocalBuildInfo -> String
-- | Compatibility "package name" that we register this component as.
[componentCompatPackageName] :: ComponentLocalBuildInfo -> MungedPackageName
-- | A list of exposed modules (either defined in this component, or
-- reexported from another component.)
[componentExposedModules] :: ComponentLocalBuildInfo -> [ExposedModule]
-- | Convenience field, specifying whether or not this is the "public
-- library" that has the same name as the package.
[componentIsPublic] :: ComponentLocalBuildInfo -> Bool
FLibComponentLocalBuildInfo :: ComponentName -> ComponentId -> UnitId -> [(UnitId, MungedPackageId)] -> [(OpenUnitId, ModuleRenaming)] -> [UnitId] -> [UnitId] -> ComponentLocalBuildInfo
-- | It would be very convenient to store the literal Library here, but if
-- we do that, it will get serialized (via the Binary) instance twice. So
-- instead we just provide the ComponentName, which can be used to find
-- the Component in the PackageDescription. NB: eventually, this will NOT
-- uniquely identify the ComponentLocalBuildInfo.
[componentLocalName] :: ComponentLocalBuildInfo -> ComponentName
-- | The computed ComponentId of this component.
[componentComponentId] :: ComponentLocalBuildInfo -> ComponentId
-- | The computed UnitId which uniquely identifies this component.
-- Might be hashed.
[componentUnitId] :: ComponentLocalBuildInfo -> UnitId
-- | Resolved internal and external package dependencies for this
-- component. The BuildInfo specifies a set of build
-- dependencies that must be satisfied in terms of version ranges. This
-- field fixes those dependencies to the specific versions available on
-- this machine for this compiler.
[componentPackageDeps] :: ComponentLocalBuildInfo -> [(UnitId, MungedPackageId)]
-- | The set of packages that are brought into scope during compilation,
-- including a ModuleRenaming which may used to hide or rename
-- modules. This is what gets translated into -package-id
-- arguments. This is a modernized version of
-- componentPackageDeps, which is kept around for BC purposes.
[componentIncludes] :: ComponentLocalBuildInfo -> [(OpenUnitId, ModuleRenaming)]
[componentExeDeps] :: ComponentLocalBuildInfo -> [UnitId]
-- | The internal dependencies which induce a graph on the
-- ComponentLocalBuildInfo of this package. This does NOT coincide
-- with componentPackageDeps because it ALSO records 'build-tool'
-- dependencies on executables. Maybe one day cabal-install will
-- also handle these correctly too!
[componentInternalDeps] :: ComponentLocalBuildInfo -> [UnitId]
ExeComponentLocalBuildInfo :: ComponentName -> ComponentId -> UnitId -> [(UnitId, MungedPackageId)] -> [(OpenUnitId, ModuleRenaming)] -> [UnitId] -> [UnitId] -> ComponentLocalBuildInfo
-- | It would be very convenient to store the literal Library here, but if
-- we do that, it will get serialized (via the Binary) instance twice. So
-- instead we just provide the ComponentName, which can be used to find
-- the Component in the PackageDescription. NB: eventually, this will NOT
-- uniquely identify the ComponentLocalBuildInfo.
[componentLocalName] :: ComponentLocalBuildInfo -> ComponentName
-- | The computed ComponentId of this component.
[componentComponentId] :: ComponentLocalBuildInfo -> ComponentId
-- | The computed UnitId which uniquely identifies this component.
-- Might be hashed.
[componentUnitId] :: ComponentLocalBuildInfo -> UnitId
-- | Resolved internal and external package dependencies for this
-- component. The BuildInfo specifies a set of build
-- dependencies that must be satisfied in terms of version ranges. This
-- field fixes those dependencies to the specific versions available on
-- this machine for this compiler.
[componentPackageDeps] :: ComponentLocalBuildInfo -> [(UnitId, MungedPackageId)]
-- | The set of packages that are brought into scope during compilation,
-- including a ModuleRenaming which may used to hide or rename
-- modules. This is what gets translated into -package-id
-- arguments. This is a modernized version of
-- componentPackageDeps, which is kept around for BC purposes.
[componentIncludes] :: ComponentLocalBuildInfo -> [(OpenUnitId, ModuleRenaming)]
[componentExeDeps] :: ComponentLocalBuildInfo -> [UnitId]
-- | The internal dependencies which induce a graph on the
-- ComponentLocalBuildInfo of this package. This does NOT coincide
-- with componentPackageDeps because it ALSO records 'build-tool'
-- dependencies on executables. Maybe one day cabal-install will
-- also handle these correctly too!
[componentInternalDeps] :: ComponentLocalBuildInfo -> [UnitId]
TestComponentLocalBuildInfo :: ComponentName -> ComponentId -> UnitId -> [(UnitId, MungedPackageId)] -> [(OpenUnitId, ModuleRenaming)] -> [UnitId] -> [UnitId] -> ComponentLocalBuildInfo
-- | It would be very convenient to store the literal Library here, but if
-- we do that, it will get serialized (via the Binary) instance twice. So
-- instead we just provide the ComponentName, which can be used to find
-- the Component in the PackageDescription. NB: eventually, this will NOT
-- uniquely identify the ComponentLocalBuildInfo.
[componentLocalName] :: ComponentLocalBuildInfo -> ComponentName
-- | The computed ComponentId of this component.
[componentComponentId] :: ComponentLocalBuildInfo -> ComponentId
-- | The computed UnitId which uniquely identifies this component.
-- Might be hashed.
[componentUnitId] :: ComponentLocalBuildInfo -> UnitId
-- | Resolved internal and external package dependencies for this
-- component. The BuildInfo specifies a set of build
-- dependencies that must be satisfied in terms of version ranges. This
-- field fixes those dependencies to the specific versions available on
-- this machine for this compiler.
[componentPackageDeps] :: ComponentLocalBuildInfo -> [(UnitId, MungedPackageId)]
-- | The set of packages that are brought into scope during compilation,
-- including a ModuleRenaming which may used to hide or rename
-- modules. This is what gets translated into -package-id
-- arguments. This is a modernized version of
-- componentPackageDeps, which is kept around for BC purposes.
[componentIncludes] :: ComponentLocalBuildInfo -> [(OpenUnitId, ModuleRenaming)]
[componentExeDeps] :: ComponentLocalBuildInfo -> [UnitId]
-- | The internal dependencies which induce a graph on the
-- ComponentLocalBuildInfo of this package. This does NOT coincide
-- with componentPackageDeps because it ALSO records 'build-tool'
-- dependencies on executables. Maybe one day cabal-install will
-- also handle these correctly too!
[componentInternalDeps] :: ComponentLocalBuildInfo -> [UnitId]
BenchComponentLocalBuildInfo :: ComponentName -> ComponentId -> UnitId -> [(UnitId, MungedPackageId)] -> [(OpenUnitId, ModuleRenaming)] -> [UnitId] -> [UnitId] -> ComponentLocalBuildInfo
-- | It would be very convenient to store the literal Library here, but if
-- we do that, it will get serialized (via the Binary) instance twice. So
-- instead we just provide the ComponentName, which can be used to find
-- the Component in the PackageDescription. NB: eventually, this will NOT
-- uniquely identify the ComponentLocalBuildInfo.
[componentLocalName] :: ComponentLocalBuildInfo -> ComponentName
-- | The computed ComponentId of this component.
[componentComponentId] :: ComponentLocalBuildInfo -> ComponentId
-- | The computed UnitId which uniquely identifies this component.
-- Might be hashed.
[componentUnitId] :: ComponentLocalBuildInfo -> UnitId
-- | Resolved internal and external package dependencies for this
-- component. The BuildInfo specifies a set of build
-- dependencies that must be satisfied in terms of version ranges. This
-- field fixes those dependencies to the specific versions available on
-- this machine for this compiler.
[componentPackageDeps] :: ComponentLocalBuildInfo -> [(UnitId, MungedPackageId)]
-- | The set of packages that are brought into scope during compilation,
-- including a ModuleRenaming which may used to hide or rename
-- modules. This is what gets translated into -package-id
-- arguments. This is a modernized version of
-- componentPackageDeps, which is kept around for BC purposes.
[componentIncludes] :: ComponentLocalBuildInfo -> [(OpenUnitId, ModuleRenaming)]
[componentExeDeps] :: ComponentLocalBuildInfo -> [UnitId]
-- | The internal dependencies which induce a graph on the
-- ComponentLocalBuildInfo of this package. This does NOT coincide
-- with componentPackageDeps because it ALSO records 'build-tool'
-- dependencies on executables. Maybe one day cabal-install will
-- also handle these correctly too!
[componentInternalDeps] :: ComponentLocalBuildInfo -> [UnitId]
data Library
Library :: LibraryName -> [ModuleName] -> [ModuleReexport] -> [ModuleName] -> Bool -> LibraryVisibility -> BuildInfo -> Library
[libName] :: Library -> LibraryName
[exposedModules] :: Library -> [ModuleName]
[reexportedModules] :: Library -> [ModuleReexport]
-- | What sigs need implementations?
[signatures] :: Library -> [ModuleName]
-- | Is the lib to be exposed by default? (i.e. whether its modules
-- available in GHCi for example)
[libExposed] :: Library -> Bool
-- | Whether this multilib can be used as a dependency for other packages.
[libVisibility] :: Library -> LibraryVisibility
[libBuildInfo] :: Library -> BuildInfo
-- | A foreign library stanza is like a library stanza, except that the
-- built code is intended for consumption by a non-Haskell client.
data ForeignLib
ForeignLib :: UnqualComponentName -> ForeignLibType -> [ForeignLibOption] -> BuildInfo -> Maybe LibVersionInfo -> Maybe Version -> [RelativePath Source 'File] -> ForeignLib
-- | Name of the foreign library
[foreignLibName] :: ForeignLib -> UnqualComponentName
-- | What kind of foreign library is this (static or dynamic).
[foreignLibType] :: ForeignLib -> ForeignLibType
-- | What options apply to this foreign library (e.g., are we merging in
-- all foreign dependencies.)
[foreignLibOptions] :: ForeignLib -> [ForeignLibOption]
-- | Build information for this foreign library.
[foreignLibBuildInfo] :: ForeignLib -> BuildInfo
-- | Libtool-style version-info data to compute library version. Refer to
-- the libtool documentation on the current:revision:age versioning
-- scheme.
[foreignLibVersionInfo] :: ForeignLib -> Maybe LibVersionInfo
-- | Linux library version
[foreignLibVersionLinux] :: ForeignLib -> Maybe Version
-- | (Windows-specific) module definition files
--
-- This is a list rather than a maybe field so that we can flatten the
-- condition trees (for instance, when creating an sdist)
[foreignLibModDefFile] :: ForeignLib -> [RelativePath Source 'File]
data Executable
Executable :: UnqualComponentName -> RelativePath Source 'File -> ExecutableScope -> BuildInfo -> Executable
[exeName] :: Executable -> UnqualComponentName
[modulePath] :: Executable -> RelativePath Source 'File
[exeScope] :: Executable -> ExecutableScope
[buildInfo] :: Executable -> BuildInfo
-- | A "test-suite" stanza in a cabal file.
data TestSuite
TestSuite :: UnqualComponentName -> TestSuiteInterface -> BuildInfo -> [String] -> TestSuite
[testName] :: TestSuite -> UnqualComponentName
[testInterface] :: TestSuite -> TestSuiteInterface
[testBuildInfo] :: TestSuite -> BuildInfo
[testCodeGenerators] :: TestSuite -> [String]
-- | A "benchmark" stanza in a cabal file.
data Benchmark
Benchmark :: UnqualComponentName -> BenchmarkInterface -> BuildInfo -> Benchmark
[benchmarkName] :: Benchmark -> UnqualComponentName
[benchmarkInterface] :: Benchmark -> BenchmarkInterface
[benchmarkBuildInfo] :: Benchmark -> BuildInfo
data LibraryName
LMainLibName :: LibraryName
LSubLibName :: UnqualComponentName -> LibraryName
emptyLibrary :: Library
-- | An empty foreign library.
emptyForeignLib :: ForeignLib
emptyExecutable :: Executable
emptyTestSuite :: TestSuite
emptyBenchmark :: Benchmark