diff options
Diffstat (limited to 'src/Haddock')
-rw-r--r-- | src/Haddock/Types.hs | 70 |
1 files changed, 47 insertions, 23 deletions
diff --git a/src/Haddock/Types.hs b/src/Haddock/Types.hs index 6ae2309e..ccac6014 100644 --- a/src/Haddock/Types.hs +++ b/src/Haddock/Types.hs @@ -22,29 +22,53 @@ data DocOption deriving (Eq, Show) data ExportItem name - = ExportDecl - Name -- ^ The original name - (LHsDecl name) -- ^ A declaration - (Maybe (HsDoc name)) -- ^ Maybe a doc comment - [InstHead name] -- ^ Instances relevant to this declaration - - | ExportNoDecl -- ^ An exported entity for which we have no - -- documentation (perhaps because it resides in - -- another package) - Name -- ^ The original name - name -- ^ Where to link to - [name] -- ^ Subordinate names - - | ExportGroup -- ^ A section heading - Int -- ^ section level (1, 2, 3, ... ) - String -- ^ Section "id" (for hyperlinks) - (HsDoc name) -- ^ Section heading text - - | ExportDoc -- ^ Some documentation - (HsDoc name) - - | ExportModule -- ^ A cross-reference to another module - Module + + = ExportDecl { + + -- | The original name + expItemName :: Name, + + -- | A declaration + expItemDecl :: LHsDecl name, + + -- | Maybe a doc comment + expItemMbDoc :: Maybe (HsDoc name), + + -- | Instances relevant to this declaration + expItemInstances :: [InstHead name] + + } -- ^ An exported declaration + + | ExportNoDecl { + -- | The original name + expItemName :: Name, + + -- | Where to link to + expItemLinkTarget :: name, + + -- | Subordinate names + expItemSubs :: [name] + + } -- ^ An exported entity for which we have no + -- documentation (perhaps because it resides in + -- another package) + + | ExportGroup { + + -- | Section level (1, 2, 3, ... ) + expItemSectionLevel :: Int, + + -- | Section id (for hyperlinks) + expItemSectionId :: String, + + -- | Section heading text + expItemSectionText :: HsDoc name + + } -- ^ A section heading + + | ExportDoc (HsDoc name) -- ^ Some documentation + + | ExportModule Module -- ^ A cross-reference to another module type InstHead name = ([HsPred name], name, [HsType name]) type ModuleMap = Map Module HaddockModule |