Portability | portable |
---|---|
Stability | experimental |
Maintainer | haddock@projects.haskell.org |
Haddock.Interface
Description
This module typechecks Haskell modules using the GHC API and processes
the result to create Interface
s. The typechecking and the Interface
creation is interleaved, so that when a module is processed, the
Interface
s 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 Interface
s are "renamed"
using this environment.
- processModules :: Verbosity -> [String] -> [Flag] -> [InterfaceFile] -> Ghc ([Interface], LinkEnv)
Documentation
Arguments
:: Verbosity | Verbosity of logging to |
-> [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 Interface
s and a link environment by typechecking the list of
modules using the GHC API and processing the resulting syntax trees.