haddock

Portabilityportable
Stabilityexperimental
Maintainerhaddock@projects.haskell.org

Haddock.Interface

Description

This module typechecks Haskell modules using the GHC API and processes the result to create Interfaces. The typechecking and the Interface creation is interleaved, so that when a module is processed, the Interfaces of all previously processed modules are available. The creation of an Interface from a typechecked module is delegated to Haddock.Interface.Create.

When all modules have been typechecked and processed, information about instances are attached to each Interface. This task is delegated to Haddock.Interface.AttachInstances. Note that this is done as a separate step because GHC can't know about all instances until all modules have been typechecked.

As a last step a link environment is built which maps names to the "best" places to link to in the documentation, and all Interfaces are "renamed" using this environment.

Synopsis

Documentation

processModules

Arguments

:: Verbosity

Verbosity of logging to stdout

-> [String]

A list of file or module names sorted by module topology

-> [Flag]

Command-line flags

-> [InterfaceFile]

Interface files of package dependencies

-> Ghc ([Interface], LinkEnv)

Resulting list of interfaces and renaming environment

Create Interfaces and a link environment by typechecking the list of modules using the GHC API and processing the resulting syntax trees.