Cabal-3.10.1.0: A framework for packaging Haskell software

Copyright | Isaac Jones 2003-2005
License | BSD3
Maintainer | cabal-devel@haskell.org
Portability | portable
Safe Haskell | Safe-Inferred
Language | Haskell2010

Distribution.Simple.Haddock

Description

This module deals with the `haddock` and `hscolour` commands. It uses information about installed packages (from `ghc-pkg`) to find the locations of documentation for dependent packages, so it can create links.

The `hscolour` support allows generating HTML versions of the original source, with coloured syntax highlighting.

Synopsis

- haddock :: PackageDescription -> LocalBuildInfo -> [PPSuffixHandler] -> HaddockFlags -> IO ()
- createHaddockIndex :: Verbosity -> ProgramDb -> Compiler -> Platform -> HaddockProjectFlags -> IO ()
- hscolour :: PackageDescription -> LocalBuildInfo -> [PPSuffixHandler] -> HscolourFlags -> IO ()
- haddockPackagePaths :: [InstalledPackageInfo] -> Maybe (InstalledPackageInfo -> FilePath) -> IO ([(FilePath, Maybe FilePath, Maybe FilePath, Visibility)], Maybe String)
- data Visibility
  - = Visible
  - | Hidden

# Documentation

haddock :: PackageDescription -> LocalBuildInfo -> [PPSuffixHandler] -> HaddockFlags -> IO () Source #

createHaddockIndex :: Verbosity -> ProgramDb -> Compiler -> Platform -> HaddockProjectFlags -> IO () Source #

Execute `Haddock` configured with `HaddocksFlags`. It is used to build index and contents for documentation of multiple packages.

hscolour :: PackageDescription -> LocalBuildInfo -> [PPSuffixHandler] -> HscolourFlags -> IO () Source #

haddockPackagePaths :: [InstalledPackageInfo] -> Maybe (InstalledPackageInfo -> FilePath) -> IO ([(FilePath, Maybe FilePath, Maybe FilePath, Visibility)], Maybe String) Source #

Given a list of `InstalledPackageInfo`s, return a list of interfaces and HTML paths, and an optional warning for packages with missing documentation.

data Visibility Source #

Governs whether modules from a given interface should be visible or hidden in the Haddock generated content page. We don't expose this functionality to the user, but simply use `Visible` for only local packages. Visibility of modules is available since `haddock-2.26.1`.

Constructors

Visible |
Hidden |

#### Instances

Instances details

Show Visibility Source # |
Instance details Defined in Distribution.Simple.Setup Methods showsPrec :: Int -> Visibility -> ShowS Source # show :: Visibility -> String Source # showList :: [Visibility] -> ShowS Source #
Eq Visibility Source # |
Instance details Defined in Distribution.Simple.Setup Methods (==) :: Visibility -> Visibility -> Bool # (/=) :: Visibility -> Visibility -> Bool #