| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
BuildEnv.BuildOne
Description
setupPackage prepares a package for building, returning instructions
that compile its Setup script.
buildUnit computes build instructions to configure, build and install
the unit using its Setup script. If the unit is a library, the instructions
will also register it into a local package database using ghc-pkg.
Synopsis
- setupPackage :: Verbosity -> Compiler -> SymbolicPath CWD (Dir Project) -> BuildPaths ForBuild -> PkgDbDir ForBuild -> PkgDir ForPrep -> PkgDir ForBuild -> Map UnitId PlanUnit -> ConfiguredUnit -> IO BuildScript
- buildUnit :: Verbosity -> Compiler -> SymbolicPath CWD (Dir Project) -> BuildPaths ForBuild -> PkgDbDir ForBuild -> PkgDir ForBuild -> UnitArgs -> Map UnitId PlanUnit -> ConfiguredUnit -> BuildScript
- data PkgDir use = PkgDir {
- pkgNameVer :: !String
- pkgDir :: !(SymbolicPath Project (Dir Pkg))
- getPkgDir :: Paths use -> ConfiguredUnit -> PkgDir use
- data family PkgDbDir use
- getPkgDbDirForPrep :: Paths ForPrep -> PkgDbDir ForPrep
- getPkgDbDirForBuild :: Paths ForBuild -> IO (PkgDbDir ForBuild)
Building packages
Arguments
| :: Verbosity | |
| -> Compiler | |
| -> SymbolicPath CWD (Dir Project) | |
| -> BuildPaths ForBuild | Overall build directory structure. |
| -> PkgDbDir ForBuild | Package database directory (see |
| -> PkgDir ForPrep | Package directory (to find the |
| -> PkgDir ForBuild | Package directory (to build the |
| -> Map UnitId PlanUnit | All dependencies in the build plan. |
| -> ConfiguredUnit | The unit to build. |
| -> IO BuildScript |
Setup a single package.
Returns a build script which compiles the Setup script.
Arguments
| :: Verbosity | |
| -> Compiler | |
| -> SymbolicPath CWD (Dir Project) | |
| -> BuildPaths ForBuild | Overall build directory structure. |
| -> PkgDbDir ForBuild | Package database directory (see |
| -> PkgDir ForBuild | This package's directory (see |
| -> UnitArgs | Extra arguments for this unit. |
| -> Map UnitId PlanUnit | All dependencies in the build plan. |
| -> ConfiguredUnit | The unit to build. |
| -> BuildScript |
Return build steps to to configure, build and and installing the unit, including registering it in the package database if it is a library.
You can run the build script with executeBuildScript, or you can
turn it into a shell script with script.
Note: executing the build script will fail if the unit has already been registered in the package database.
Package directory structure helpers
The package name-version string and its directory.
Constructors
| PkgDir | |
Fields
| |
Arguments
| :: Paths use | Overall directory structure to base the computation off. |
| -> ConfiguredUnit | Any unit from the package in question. |
| -> PkgDir use |
Compute the package directory location.
data family PkgDbDir use Source #
The package database directory.
Instances
| data PkgDbDir 'ForBuild Source # | |
Defined in BuildEnv.BuildOne data PkgDbDir 'ForBuild = PkgDbDirForBuild {
| |
| data PkgDbDir 'ForPrep Source # | |
Defined in BuildEnv.BuildOne | |