|
Distribution.PackageDescription | Portability | portable | Stability | alpha | Maintainer | Isaac Jones <ijones@syntaxpolice.org> |
|
|
|
|
|
Description |
Package description and parsing.
|
|
Synopsis |
|
|
|
|
Package descriptions
|
|
data PackageDescription | Source |
|
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 | | Instances | |
|
|
data GenericPackageDescription | Source |
|
Constructors | GenericPackageDescription | | |
| Instances | |
|
|
finalizePackageDescription | Source |
|
|
|
|
Flatten a generic package description by ignoring all conditions and just
join the field descriptors into on package description. Note, however,
that this may lead to inconsistent field values, since all values are
joined into one field, which may not be possible in the original package
description, due to the use of exclusive choices (if ... else ...).
XXX: One particularly tricky case is defaulting. In the original package
description, e.g., the source dirctory might either be the default or a
certain, explicitly set path. Since defaults are filled in only after the
package has been resolved and when no explicit value has been set, the
default path will be missing from the package description returned by this
function.
|
|
|
|
|
Parse the given package file.
|
|
|
|
|
Parses the given file into a GenericPackageDescription.
In Cabal 1.2 the syntax for package descriptions was changed to a format
with sections and possibly indented property descriptions.
|
|
|
|
|
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 | |
|
|
Libraries
|
|
|
Constructors | | Instances | |
|
|
|
If the package description has a library section, call the given
function with the library build info as argument.
|
|
|
does this package have any libraries?
|
|
|
Get all the module names from the libraries in this package
|
|
Executables
|
|
|
Constructors | | Instances | |
|
|
|
Perform the action on each buildable Executable in the package
description.
|
|
|
does this package have any executables?
|
|
|
Get all the module names from the exes in this package
|
|
Parsing
|
|
|
Field descriptor. The parameter a parameterizes over where the field's
value is stored in.
| Constructors | FieldDescr | | fieldName :: String | | fieldGet :: (a -> Doc) | | fieldSet :: (LineNo -> String -> a -> ParseResult a) | fieldSet n str x Parses the field value from the given input
string str and stores the result in x if the parse was
successful. Otherwise, reports an error on line number n.
|
|
|
|
|
|
|
Sanity checking
|
|
|
Sanity check this description file.
|
|
Build information
|
|
|
Constructors | BuildInfo | | buildable :: Bool | component is buildable here
| buildTools :: [Dependency] | tools needed to build this bit
| cppOptions :: [String] | options for pre-processing Haskell code
| ccOptions :: [String] | options for C compiler
| ldOptions :: [String] | options for linker
| pkgconfigDepends :: [Dependency] | pkg-config packages that are used
| frameworks :: [String] | support frameworks for Mac OS X
| cSources :: [FilePath] | | hsSourceDirs :: [FilePath] | where to look for the haskell module hierarchy
| otherModules :: [String] | non-exposed or non-main modules
| extensions :: [Extension] | | extraLibs :: [String] | what libraries to link with when compiling a program that uses your package
| extraLibDirs :: [String] | | includeDirs :: [FilePath] | directories to find .h files
| includes :: [FilePath] | The .h files to be found in includeDirs
| installIncludes :: [FilePath] | .h files to install with the package
| options :: [(CompilerFlavor, [String])] | | ghcProfOptions :: [String] | | ghcSharedOptions :: [String] | |
|
| Instances | |
|
|
|
|
|
The BuildInfo for the library (if there is one and it's buildable) and
all the buildable executables. Useful for gathering dependencies.
|
|
Supplementary build information
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Update the given package description with the output from the
pre-hooks.
|
|
Utilities
|
|
|
|
|
Constructors | | Instances | |
|
|
|
Select options for a particular Haskell compiler.
|
|
|
The name of the auto-generated module associated with a package
|
|
|
|
|
|
|
|
Produced by Haddock version 0.8 |