ghc-6.10.4: The GHC APIContentsIndex
HaddockUtils
Synopsis
parseModuleHeader :: String -> Either String (String, HaddockModInfo RdrName)
parseKey :: String -> String -> Maybe (String, String)
type Field a = ([Located a], LBangType a, Maybe (LHsDoc a))
addFieldDoc :: Field a -> Maybe (LHsDoc a) -> Field a
addFieldDocs :: [Field a] -> Maybe (LHsDoc a) -> [Field a]
addConDoc :: LConDecl a -> Maybe (LHsDoc a) -> LConDecl a
addConDocs :: [LConDecl a] -> Maybe (LHsDoc a) -> [LConDecl a]
addConDocFirst :: [LConDecl a] -> Maybe (LHsDoc a) -> [LConDecl a]
Documentation
parseModuleHeader :: String -> Either String (String, HaddockModInfo RdrName)
parseKey :: String -> String -> Maybe (String, String)

This function is how we read keys.

all fields in the header are optional and have the form

spaces1
[field name][spaces] : [text]n ([spaces2][space][text]n | [spaces]n)* where each [spaces2] should have [spaces1] as a prefix.

Thus for the key Description,

 Description : this is a
    rather long

    description

 The module comment starts here

the value will be this is a .. description and the rest will begin at The module comment.

type Field a = ([Located a], LBangType a, Maybe (LHsDoc a))
addFieldDoc :: Field a -> Maybe (LHsDoc a) -> Field a
addFieldDocs :: [Field a] -> Maybe (LHsDoc a) -> [Field a]
addConDoc :: LConDecl a -> Maybe (LHsDoc a) -> LConDecl a
addConDocs :: [LConDecl a] -> Maybe (LHsDoc a) -> [LConDecl a]
addConDocFirst :: [LConDecl a] -> Maybe (LHsDoc a) -> [LConDecl a]
Produced by Haddock version 2.4.2