| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Distribution.Client.CmdHaddock
Description
cabal-install CLI command: haddock
Synopsis
- haddockCommand :: CommandUI (NixStyleFlags ClientHaddockFlags)
- haddockAction :: NixStyleFlags ClientHaddockFlags -> [String] -> GlobalFlags -> IO ()
- newtype ClientHaddockFlags = ClientHaddockFlags {}
- selectPackageTargets :: HaddockFlags -> TargetSelector -> [AvailableTarget k] -> Either TargetProblem' [k]
- selectComponentTarget :: SubComponentTarget -> AvailableTarget k -> Either TargetProblem' k
The haddock CLI and action
haddockAction :: NixStyleFlags ClientHaddockFlags -> [String] -> GlobalFlags -> IO () #
The haddock command is TODO.
For more details on how this works, see the module Distribution.Client.ProjectOrchestration
newtype ClientHaddockFlags #
Constructors
| ClientHaddockFlags | |
Fields | |
Internals exposed for testing
selectPackageTargets :: HaddockFlags -> TargetSelector -> [AvailableTarget k] -> Either TargetProblem' [k] #
This defines what a TargetSelector means for the haddock command.
It selects the AvailableTargets that the TargetSelector refers to,
or otherwise classifies the problem.
For the haddock command we select all buildable libraries. Additionally,
depending on the --executables flag we also select all the buildable exes.
We do similarly for test-suites, benchmarks and foreign libs.
selectComponentTarget :: SubComponentTarget -> AvailableTarget k -> Either TargetProblem' k #
For a TargetComponent TargetSelector, check if the component can be
selected.
For the haddock command we just need the basic checks on being buildable
etc.