Cabal- A framework for packaging Haskell software

Safe HaskellNone



This module deals with the haddock and hscolour commands. Sadly this is a rather complicated module. It deals with two versions of haddock (0.x and 2.x). It has to do pre-processing which involves 'unlit'ing and using -D__HADDOCK__ for any source code that uses cpp. 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.



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

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