cabal-install-3.8.1.0: The command-line interface for Cabal and Hackage.
Safe HaskellNone
LanguageHaskell2010

Distribution.Client.CmdHaddock

Description

cabal-install CLI command: haddock

Synopsis

The haddock CLI and action

haddockAction :: NixStyleFlags ClientHaddockFlags -> [String] -> GlobalFlags -> IO () Source #

The haddock command is TODO.

For more details on how this works, see the module Distribution.Client.ProjectOrchestration

Internals exposed for testing

selectPackageTargets :: HaddockFlags -> TargetSelector -> [AvailableTarget k] -> Either TargetProblem' [k] Source #

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 Source #

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.