haddock-2.4.0: A documentation-generation tool for Haskell librariesSource codeContentsIndex
Distribution.Haddock
Synopsis
readInterfaceFile :: MonadIO m => NameCacheAccessor m -> FilePath -> m (Either String InterfaceFile)
data InterfaceFile = InterfaceFile {
ifLinkEnv :: LinkEnv
ifInstalledIfaces :: [InstalledInterface]
}
type LinkEnv = Map Name Module
data InstalledInterface = InstalledInterface {
instMod :: Module
instInfo :: HaddockModInfo Name
instDocMap :: Map Name (HsDoc DocName)
instExports :: [Name]
instVisibleExports :: [Name]
}
data DocName
= Documented Name Module
| Undocumented Name
Documentation
readInterfaceFile :: MonadIO m => NameCacheAccessor m -> FilePath -> m (Either String InterfaceFile)Source

Read a Haddock (.haddock) interface file. Return either an InterfaceFile or an error message.

This function can be called in two ways. Within a GHC session it will update the use and update the session's name cache. Outside a GHC session a new empty name cache is used. The function is therefore generic in the monad being used. The exact monad is whichever monad the first argument, the getter and setter of the name cache, requires.

data InterfaceFile Source
Constructors
InterfaceFile
ifLinkEnv :: LinkEnv
ifInstalledIfaces :: [InstalledInterface]
show/hide Instances
type LinkEnv = Map Name ModuleSource
data InstalledInterface Source
A smaller version of Interface that we can get from the Haddock interface files.
Constructors
InstalledInterface
instMod :: Module
instInfo :: HaddockModInfo Name
instDocMap :: Map Name (HsDoc DocName)
instExports :: [Name]
instVisibleExports :: [Name]
show/hide Instances
data DocName Source
Constructors
Documented Name Module
Undocumented Name
show/hide Instances
Produced by Haddock version 2.3.0