| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Distribution.Client.ProjectBuilding.UnpackedPackage
Contents
Description
This module exposes functions to build and register unpacked packages.
Mainly, unpacked packages are either: * Built and registered in-place * Built and installed
The two cases differ significantly for there to be a distinction. For instance, we only care about file monitoring and re-building when dealing with "inplace" registered packages, whereas for installed packages we don't.
Synopsis
- buildInplaceUnpackedPackage :: Verbosity -> DistDirLayout -> Maybe SemaphoreIdentifier -> BuildTimeSettings -> Lock -> Lock -> ElaboratedSharedConfig -> ElaboratedInstallPlan -> ElaboratedReadyPackage -> TVar InstalledPackageIndex -> BuildStatusRebuild -> SymbolicPath CWD ('Dir Pkg) -> SymbolicPath Pkg ('Dir Dist) -> IO BuildResult
- buildAndInstallUnpackedPackage :: Verbosity -> DistDirLayout -> StoreDirLayout -> Maybe SemaphoreIdentifier -> BuildTimeSettings -> Lock -> Lock -> ElaboratedSharedConfig -> ElaboratedInstallPlan -> ElaboratedReadyPackage -> TVar InstalledPackageIndex -> SymbolicPath CWD ('Dir Pkg) -> SymbolicPath Pkg ('Dir Dist) -> IO BuildResult
- buildAndRegisterUnpackedPackage :: Verbosity -> DistDirLayout -> Maybe SemaphoreIdentifier -> BuildTimeSettings -> Lock -> Lock -> ElaboratedSharedConfig -> ElaboratedInstallPlan -> ElaboratedReadyPackage -> TVar InstalledPackageIndex -> SymbolicPath CWD ('Dir Pkg) -> SymbolicPath Pkg ('Dir Dist) -> Maybe FilePath -> (forall r. PackageBuildingPhase r -> IO r) -> IO ()
- data PackageBuildingPhase r
- annotateFailure :: Maybe FilePath -> (SomeException -> BuildFailureReason) -> IO a -> IO a
- annotateFailureNoLog :: (SomeException -> BuildFailureReason) -> IO a -> IO a
Documentation
buildInplaceUnpackedPackage :: Verbosity -> DistDirLayout -> Maybe SemaphoreIdentifier -> BuildTimeSettings -> Lock -> Lock -> ElaboratedSharedConfig -> ElaboratedInstallPlan -> ElaboratedReadyPackage -> TVar InstalledPackageIndex -> BuildStatusRebuild -> SymbolicPath CWD ('Dir Pkg) -> SymbolicPath Pkg ('Dir Dist) -> IO BuildResult Source #
buildAndInstallUnpackedPackage Source #
Arguments
| :: Verbosity | |
| -> DistDirLayout | |
| -> StoreDirLayout | |
| -> Maybe SemaphoreIdentifier | Whether to pass a semaphore to build process this is different to BuildTimeSettings because the name of the semaphore is created freshly each time. |
| -> BuildTimeSettings | |
| -> Lock | |
| -> Lock | |
| -> ElaboratedSharedConfig | |
| -> ElaboratedInstallPlan | |
| -> ElaboratedReadyPackage | |
| -> TVar InstalledPackageIndex | |
| -> SymbolicPath CWD ('Dir Pkg) | |
| -> SymbolicPath Pkg ('Dir Dist) | |
| -> IO BuildResult |
Auxiliary definitions
buildAndRegisterUnpackedPackage Source #
Arguments
| :: Verbosity | |
| -> DistDirLayout | |
| -> Maybe SemaphoreIdentifier | Whether to pass a semaphore to build process this is different to BuildTimeSettings because the name of the semaphore is created freshly each time. |
| -> BuildTimeSettings | |
| -> Lock | |
| -> Lock | |
| -> ElaboratedSharedConfig | |
| -> ElaboratedInstallPlan | |
| -> ElaboratedReadyPackage | |
| -> TVar InstalledPackageIndex | Running |
| -> SymbolicPath CWD ('Dir Pkg) | |
| -> SymbolicPath Pkg ('Dir Dist) | |
| -> Maybe FilePath | The path to an initialized log file |
| -> (forall r. PackageBuildingPhase r -> IO r) | |
| -> IO () |
Structures the phases of building and registering a package amongst others
(see PackageBuildingPhase). Delegates logic specific to a certain
building style (notably, inplace vs install) to the delegate function that
receives as an argument PackageBuildingPhase)
data PackageBuildingPhase r Source #
Each unpacked package is processed in the following phases:
- Configure phase
- Build phase
- Haddock phase
- Install phase (copy + register)
- Register phase
- Test phase
- Bench phase
- Repl phase
Depending on whether we are installing the package or building it inplace, the phases will be carried out differently. For example, when installing, the test, benchmark, and repl phase are ignored.
Utilities
annotateFailure :: Maybe FilePath -> (SomeException -> BuildFailureReason) -> IO a -> IO a Source #
annotateFailureNoLog :: (SomeException -> BuildFailureReason) -> IO a -> IO a Source #