haddock-library-1.11.0: Library exposing some functionality of Haddock.

Copyright | (c) Simon Marlow 2003-2006 David Waern 2006-2009 Mateusz Kowalczyk 2013
License | BSD-like
Maintainer | haddock@projects.haskellorg
Stability | experimental
Portability | portable
Safe Haskell | Safe-Inferred
Language | Haskell2010

Documentation.Haddock.Types

Description

Exposes documentation data types used for (some) of Haddock.

Synopsis

- data Meta = Meta {
  - _version :: Maybe Version
  - _package :: Maybe Package
  }
- data MetaDoc mod id = MetaDoc {
  - _meta :: Meta
  - _doc :: DocH mod id
  }
- overDoc :: (DocH a b -> DocH c d) -> MetaDoc a b -> MetaDoc c d
- overDocF :: Functor f => (DocH a b -> f (DocH c d)) -> MetaDoc a b -> f (MetaDoc c d)
- type Version = [Int]
- type Package = String
- data Hyperlink id = Hyperlink {
  - hyperlinkUrl :: String
  - hyperlinkLabel :: Maybe id
  }
- data ModLink id = ModLink {
  - modLinkName :: String
  - modLinkLabel :: Maybe id
  }
- data Picture = Picture {
  - pictureUri :: String
  - pictureTitle :: Maybe String
  }
- data Header id = Header {
  - headerLevel :: Int
  - headerTitle :: id
  }
- data Example = Example {
  - exampleExpression :: String
  - exampleResult :: [String]
  }
- data TableCell id = TableCell {
  - tableCellColspan :: Int
  - tableCellRowspan :: Int
  - tableCellContents :: id
  }
- newtype TableRow id = TableRow {
  - tableRowCells :: [TableCell id]
  }
- data Table id = Table {
  - tableHeaderRows :: [TableRow id]
  - tableBodyRows :: [TableRow id]
  }
- data DocH mod id
  - = DocEmpty
  - | DocAppend (DocH mod id) (DocH mod id)
  - | DocString String
  - | DocParagraph (DocH mod id)
  - | DocIdentifier id
  - | DocIdentifierUnchecked mod
  - | DocModule (ModLink (DocH mod id))
  - | DocWarning (DocH mod id)
  - | DocEmphasis (DocH mod id)
  - | DocMonospaced (DocH mod id)
  - | DocBold (DocH mod id)
  - | DocUnorderedList [DocH mod id]
  - | DocOrderedList [(Int, DocH mod id)]
  - | DocDefList [(DocH mod id, DocH mod id)]
  - | DocCodeBlock (DocH mod id)
  - | DocHyperlink (Hyperlink (DocH mod id))
  - | DocPic Picture
  - | DocMathInline String
  - | DocMathDisplay String
  - | DocAName String
  - | DocProperty String
  - | DocExamples [Example]
  - | DocHeader (Header (DocH mod id))
  - | DocTable (Table (DocH mod id))
- data Namespace
  - = Value
  - | Type
  - | None
- renderNs :: Namespace -> String
- data DocMarkupH mod id a = Markup {
  - markupEmpty :: a
  - markupString :: String -> a
  - markupParagraph :: a -> a
  - markupAppend :: a -> a -> a
  - markupIdentifier :: id -> a
  - markupIdentifierUnchecked :: mod -> a
  - markupModule :: ModLink a -> a
  - markupWarning :: a -> a
  - markupEmphasis :: a -> a
  - markupBold :: a -> a
  - markupMonospaced :: a -> a
  - markupUnorderedList :: [a] -> a
  - markupOrderedList :: [(Int, a)] -> a
  - markupDefList :: [(a, a)] -> a
  - markupCodeBlock :: a -> a
  - markupHyperlink :: Hyperlink a -> a
  - markupAName :: String -> a
  - markupPic :: Picture -> a
  - markupMathInline :: String -> a
  - markupMathDisplay :: String -> a
  - markupProperty :: String -> a
  - markupExample :: [Example] -> a
  - markupHeader :: Header a -> a
  - markupTable :: Table a -> a
  }

# Documentation

data Meta Source #

With the advent of `Version`, we may want to start attaching more meta-data to comments. We make a structure for this ahead of time so we don't have to gut half the core each time we want to add such info.

Constructors

Meta |

Fields

- _version :: Maybe Version
- _package :: Maybe Package

#### Instances

Instances details

Show Meta Source # |
Instance details Defined in Documentation.Haddock.Types Methods showsPrec :: Int -> Meta -> ShowS Source # show :: Meta -> String Source # showList :: [Meta] -> ShowS Source #
Eq Meta Source # |
Instance details Defined in Documentation.Haddock.Types Methods (==) :: Meta -> Meta -> Bool Source # (/=) :: Meta -> Meta -> Bool Source #

data MetaDoc mod id Source #

Constructors

MetaDoc |

Fields

- _meta :: Meta
- _doc :: DocH mod id

#### Instances

Instances details

Bifoldable MetaDoc Source # | NOTE: Only defined for `base >= 4.10.0`
Instance details Defined in Documentation.Haddock.Types Methods bifold :: Monoid m => MetaDoc m m -> m Source # bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> MetaDoc a b -> m Source # bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> MetaDoc a b -> c Source # bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> MetaDoc a b -> c Source #
Bifunctor MetaDoc Source # | NOTE: Only defined for `base >= 4.8.0`
Instance details Defined in Documentation.Haddock.Types Methods bimap :: (a -> b) -> (c -> d) -> MetaDoc a c -> MetaDoc b d Source # first :: (a -> b) -> MetaDoc a c -> MetaDoc b c Source # second :: (b -> c) -> MetaDoc a b -> MetaDoc a c Source #
Bitraversable MetaDoc Source # | NOTE: Only defined for `base >= 4.10.0`
Instance details Defined in Documentation.Haddock.Types Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> MetaDoc a b -> f (MetaDoc c d) Source #
Functor (MetaDoc mod) Source # |
Instance details Defined in Documentation.Haddock.Types Methods fmap :: (a -> b) -> MetaDoc mod a -> MetaDoc mod b Source # (<$) :: a -> MetaDoc mod b -> MetaDoc mod a Source #
Foldable (MetaDoc mod) Source # |

Instance details

Defined in Documentation.Haddock.Types

Methods

fold :: Monoid m => MetaDoc mod m -> m Source #

foldMap :: Monoid m => (a -> m) -> MetaDoc mod a -> m Source #

foldMap' :: Monoid m => (a -> m) -> MetaDoc mod a -> m Source #

foldr :: (a -> b -> b) -> b -> MetaDoc mod a -> b Source #

foldr' :: (a -> b -> b) -> b -> MetaDoc mod a -> b Source #

foldl :: (b -> a -> b) -> b -> MetaDoc mod a -> b Source #

foldl' :: (b -> a -> b) -> b -> MetaDoc mod a -> b Source #

foldr1 :: (a -> a -> a) -> MetaDoc mod a -> a Source #

foldl1 :: (a -> a -> a) -> MetaDoc mod a -> a Source #

toList :: MetaDoc mod a -> [a] Source #

null :: MetaDoc mod a -> Bool Source #

length :: MetaDoc mod a -> Int Source #

elem :: Eq a => a -> MetaDoc mod a -> Bool Source #

maximum :: Ord a => MetaDoc mod a -> a Source #

minimum :: Ord a => MetaDoc mod a -> a Source #

sum :: Num a => MetaDoc mod a -> a Source #

product :: Num a => MetaDoc mod a -> a Source #

Traversable (MetaDoc mod) Source # |
Instance details Defined in Documentation.Haddock.Types Methods traverse :: Applicative f => (a -> f b) -> MetaDoc mod a -> f (MetaDoc mod b) Source # sequenceA :: Applicative f => MetaDoc mod (f a) -> f (MetaDoc mod a) Source # mapM :: Monad m => (a -> m b) -> MetaDoc mod a -> m (MetaDoc mod b) Source # sequence :: Monad m => MetaDoc mod (m a) -> m (MetaDoc mod a) Source #
(Show id, Show mod) => Show (MetaDoc mod id) Source # |
Instance details Defined in Documentation.Haddock.Types Methods showsPrec :: Int -> MetaDoc mod id -> ShowS Source # show :: MetaDoc mod id -> String Source # showList :: [MetaDoc mod id] -> ShowS Source #
(Eq id, Eq mod) => Eq (MetaDoc mod id) Source # |
Instance details Defined in Documentation.Haddock.Types Methods (==) :: MetaDoc mod id -> MetaDoc mod id -> Bool Source # (/=) :: MetaDoc mod id -> MetaDoc mod id -> Bool Source #

overDoc :: (DocH a b -> DocH c d) -> MetaDoc a b -> MetaDoc c d Source #

overDocF :: Functor f => (DocH a b -> f (DocH c d)) -> MetaDoc a b -> f (MetaDoc c d) Source #

type Version = [Int] Source #

type Package = String Source #

data Hyperlink id Source #

Constructors

Hyperlink |

Fields

- hyperlinkUrl :: String
- hyperlinkLabel :: Maybe id

#### Instances

Instances details

Functor Hyperlink Source # |
Instance details Defined in Documentation.Haddock.Types Methods fmap :: (a -> b) -> Hyperlink a -> Hyperlink b Source # (<$) :: a -> Hyperlink b -> Hyperlink a Source #
Foldable Hyperlink Source # |

Instance details

Defined in Documentation.Haddock.Types

Methods

fold :: Monoid m => Hyperlink m -> m Source #

foldMap :: Monoid m => (a -> m) -> Hyperlink a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Hyperlink a -> m Source #

foldr :: (a -> b -> b) -> b -> Hyperlink a -> b Source #

foldr' :: (a -> b -> b) -> b -> Hyperlink a -> b Source #

foldl :: (b -> a -> b) -> b -> Hyperlink a -> b Source #

foldl' :: (b -> a -> b) -> b -> Hyperlink a -> b Source #

foldr1 :: (a -> a -> a) -> Hyperlink a -> a Source #

foldl1 :: (a -> a -> a) -> Hyperlink a -> a Source #

toList :: Hyperlink a -> [a] Source #

null :: Hyperlink a -> Bool Source #

length :: Hyperlink a -> Int Source #

elem :: Eq a => a -> Hyperlink a -> Bool Source #

maximum :: Ord a => Hyperlink a -> a Source #

minimum :: Ord a => Hyperlink a -> a Source #

sum :: Num a => Hyperlink a -> a Source #

product :: Num a => Hyperlink a -> a Source #

Traversable Hyperlink Source # |
Instance details Defined in Documentation.Haddock.Types Methods traverse :: Applicative f => (a -> f b) -> Hyperlink a -> f (Hyperlink b) Source # sequenceA :: Applicative f => Hyperlink (f a) -> f (Hyperlink a) Source # mapM :: Monad m => (a -> m b) -> Hyperlink a -> m (Hyperlink b) Source # sequence :: Monad m => Hyperlink (m a) -> m (Hyperlink a) Source #
Show id => Show (Hyperlink id) Source # |
Instance details Defined in Documentation.Haddock.Types Methods showsPrec :: Int -> Hyperlink id -> ShowS Source # show :: Hyperlink id -> String Source # showList :: [Hyperlink id] -> ShowS Source #
Eq id => Eq (Hyperlink id) Source # |
Instance details Defined in Documentation.Haddock.Types Methods (==) :: Hyperlink id -> Hyperlink id -> Bool Source # (/=) :: Hyperlink id -> Hyperlink id -> Bool Source #

data ModLink id Source #

Constructors

ModLink |

Fields

- modLinkName :: String
- modLinkLabel :: Maybe id

#### Instances

Instances details

Functor ModLink Source # |
Instance details Defined in Documentation.Haddock.Types Methods fmap :: (a -> b) -> ModLink a -> ModLink b Source # (<$) :: a -> ModLink b -> ModLink a Source #
Foldable ModLink Source # |

Instance details

Defined in Documentation.Haddock.Types

Methods

fold :: Monoid m => ModLink m -> m Source #

foldMap :: Monoid m => (a -> m) -> ModLink a -> m Source #

foldMap' :: Monoid m => (a -> m) -> ModLink a -> m Source #

foldr :: (a -> b -> b) -> b -> ModLink a -> b Source #

foldr' :: (a -> b -> b) -> b -> ModLink a -> b Source #

foldl :: (b -> a -> b) -> b -> ModLink a -> b Source #

foldl' :: (b -> a -> b) -> b -> ModLink a -> b Source #

foldr1 :: (a -> a -> a) -> ModLink a -> a Source #

foldl1 :: (a -> a -> a) -> ModLink a -> a Source #

toList :: ModLink a -> [a] Source #

null :: ModLink a -> Bool Source #

length :: ModLink a -> Int Source #

elem :: Eq a => a -> ModLink a -> Bool Source #

maximum :: Ord a => ModLink a -> a Source #

minimum :: Ord a => ModLink a -> a Source #

sum :: Num a => ModLink a -> a Source #

product :: Num a => ModLink a -> a Source #

Traversable ModLink Source # |
Instance details Defined in Documentation.Haddock.Types Methods traverse :: Applicative f => (a -> f b) -> ModLink a -> f (ModLink b) Source # sequenceA :: Applicative f => ModLink (f a) -> f (ModLink a) Source # mapM :: Monad m => (a -> m b) -> ModLink a -> m (ModLink b) Source # sequence :: Monad m => ModLink (m a) -> m (ModLink a) Source #
Show id => Show (ModLink id) Source # |
Instance details Defined in Documentation.Haddock.Types Methods showsPrec :: Int -> ModLink id -> ShowS Source # show :: ModLink id -> String Source # showList :: [ModLink id] -> ShowS Source #
Eq id => Eq (ModLink id) Source # |
Instance details Defined in Documentation.Haddock.Types Methods (==) :: ModLink id -> ModLink id -> Bool Source # (/=) :: ModLink id -> ModLink id -> Bool Source #

data Picture Source #

Constructors

Picture |

Fields

- pictureUri :: String
- pictureTitle :: Maybe String

#### Instances

Instances details

Show Picture Source # |
Instance details Defined in Documentation.Haddock.Types Methods showsPrec :: Int -> Picture -> ShowS Source # show :: Picture -> String Source # showList :: [Picture] -> ShowS Source #
Eq Picture Source # |
Instance details Defined in Documentation.Haddock.Types Methods (==) :: Picture -> Picture -> Bool Source # (/=) :: Picture -> Picture -> Bool Source #

data Header id Source #

Constructors

Header |

Fields

- headerLevel :: Int

  between 1 and 6 inclusive

- headerTitle :: id

#### Instances

Instances details

Functor Header Source # |
Instance details Defined in Documentation.Haddock.Types Methods fmap :: (a -> b) -> Header a -> Header b Source # (<$) :: a -> Header b -> Header a Source #
Foldable Header Source # |

Instance details

Defined in Documentation.Haddock.Types

Methods

fold :: Monoid m => Header m -> m Source #

foldMap :: Monoid m => (a -> m) -> Header a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Header a -> m Source #

foldr :: (a -> b -> b) -> b -> Header a -> b Source #

foldr' :: (a -> b -> b) -> b -> Header a -> b Source #

foldl :: (b -> a -> b) -> b -> Header a -> b Source #

foldl' :: (b -> a -> b) -> b -> Header a -> b Source #

foldr1 :: (a -> a -> a) -> Header a -> a Source #

foldl1 :: (a -> a -> a) -> Header a -> a Source #

toList :: Header a -> [a] Source #

null :: Header a -> Bool Source #

length :: Header a -> Int Source #

elem :: Eq a => a -> Header a -> Bool Source #

maximum :: Ord a => Header a -> a Source #

minimum :: Ord a => Header a -> a Source #

sum :: Num a => Header a -> a Source #

product :: Num a => Header a -> a Source #

Traversable Header Source # |
Instance details Defined in Documentation.Haddock.Types Methods traverse :: Applicative f => (a -> f b) -> Header a -> f (Header b) Source # sequenceA :: Applicative f => Header (f a) -> f (Header a) Source # mapM :: Monad m => (a -> m b) -> Header a -> m (Header b) Source # sequence :: Monad m => Header (m a) -> m (Header a) Source #
Show id => Show (Header id) Source # |
Instance details Defined in Documentation.Haddock.Types Methods showsPrec :: Int -> Header id -> ShowS Source # show :: Header id -> String Source # showList :: [Header id] -> ShowS Source #
Eq id => Eq (Header id) Source # |
Instance details Defined in Documentation.Haddock.Types Methods (==) :: Header id -> Header id -> Bool Source # (/=) :: Header id -> Header id -> Bool Source #

data Example Source #

Constructors

Example |

Fields

- exampleExpression :: String
- exampleResult :: [String]

#### Instances

Instances details

Show Example Source # |
Instance details Defined in Documentation.Haddock.Types Methods showsPrec :: Int -> Example -> ShowS Source # show :: Example -> String Source # showList :: [Example] -> ShowS Source #
Eq Example Source # |
Instance details Defined in Documentation.Haddock.Types Methods (==) :: Example -> Example -> Bool Source # (/=) :: Example -> Example -> Bool Source #

data TableCell id Source #

Constructors

TableCell |

Fields

- tableCellColspan :: Int
- tableCellRowspan :: Int
- tableCellContents :: id

#### Instances

Instances details

Functor TableCell Source # |
Instance details Defined in Documentation.Haddock.Types Methods fmap :: (a -> b) -> TableCell a -> TableCell b Source # (<$) :: a -> TableCell b -> TableCell a Source #
Foldable TableCell Source # |

Instance details

Defined in Documentation.Haddock.Types

Methods

fold :: Monoid m => TableCell m -> m Source #

foldMap :: Monoid m => (a -> m) -> TableCell a -> m Source #

foldMap' :: Monoid m => (a -> m) -> TableCell a -> m Source #

foldr :: (a -> b -> b) -> b -> TableCell a -> b Source #

foldr' :: (a -> b -> b) -> b -> TableCell a -> b Source #

foldl :: (b -> a -> b) -> b -> TableCell a -> b Source #

foldl' :: (b -> a -> b) -> b -> TableCell a -> b Source #

foldr1 :: (a -> a -> a) -> TableCell a -> a Source #

foldl1 :: (a -> a -> a) -> TableCell a -> a Source #

toList :: TableCell a -> [a] Source #

null :: TableCell a -> Bool Source #

length :: TableCell a -> Int Source #

elem :: Eq a => a -> TableCell a -> Bool Source #

maximum :: Ord a => TableCell a -> a Source #

minimum :: Ord a => TableCell a -> a Source #

sum :: Num a => TableCell a -> a Source #

product :: Num a => TableCell a -> a Source #

Traversable TableCell Source # |
Instance details Defined in Documentation.Haddock.Types Methods traverse :: Applicative f => (a -> f b) -> TableCell a -> f (TableCell b) Source # sequenceA :: Applicative f => TableCell (f a) -> f (TableCell a) Source # mapM :: Monad m => (a -> m b) -> TableCell a -> m (TableCell b) Source # sequence :: Monad m => TableCell (m a) -> m (TableCell a) Source #
Show id => Show (TableCell id) Source # |
Instance details Defined in Documentation.Haddock.Types Methods showsPrec :: Int -> TableCell id -> ShowS Source # show :: TableCell id -> String Source # showList :: [TableCell id] -> ShowS Source #
Eq id => Eq (TableCell id) Source # |
Instance details Defined in Documentation.Haddock.Types Methods (==) :: TableCell id -> TableCell id -> Bool Source # (/=) :: TableCell id -> TableCell id -> Bool Source #

newtype TableRow id Source #

Constructors

TableRow |

Fields

- tableRowCells :: [TableCell id]

#### Instances

Instances details

Functor TableRow Source # |
Instance details Defined in Documentation.Haddock.Types Methods fmap :: (a -> b) -> TableRow a -> TableRow b Source # (<$) :: a -> TableRow b -> TableRow a Source #
Foldable TableRow Source # |

Instance details

Defined in Documentation.Haddock.Types

Methods

fold :: Monoid m => TableRow m -> m Source #

foldMap :: Monoid m => (a -> m) -> TableRow a -> m Source #

foldMap' :: Monoid m => (a -> m) -> TableRow a -> m Source #

foldr :: (a -> b -> b) -> b -> TableRow a -> b Source #

foldr' :: (a -> b -> b) -> b -> TableRow a -> b Source #

foldl :: (b -> a -> b) -> b -> TableRow a -> b Source #

foldl' :: (b -> a -> b) -> b -> TableRow a -> b Source #

foldr1 :: (a -> a -> a) -> TableRow a -> a Source #

foldl1 :: (a -> a -> a) -> TableRow a -> a Source #

toList :: TableRow a -> [a] Source #

null :: TableRow a -> Bool Source #

length :: TableRow a -> Int Source #

elem :: Eq a => a -> TableRow a -> Bool Source #

maximum :: Ord a => TableRow a -> a Source #

minimum :: Ord a => TableRow a -> a Source #

sum :: Num a => TableRow a -> a Source #

product :: Num a => TableRow a -> a Source #

Traversable TableRow Source # |
Instance details Defined in Documentation.Haddock.Types Methods traverse :: Applicative f => (a -> f b) -> TableRow a -> f (TableRow b) Source # sequenceA :: Applicative f => TableRow (f a) -> f (TableRow a) Source # mapM :: Monad m => (a -> m b) -> TableRow a -> m (TableRow b) Source # sequence :: Monad m => TableRow (m a) -> m (TableRow a) Source #
Show id => Show (TableRow id) Source # |
Instance details Defined in Documentation.Haddock.Types Methods showsPrec :: Int -> TableRow id -> ShowS Source # show :: TableRow id -> String Source # showList :: [TableRow id] -> ShowS Source #
Eq id => Eq (TableRow id) Source # |
Instance details Defined in Documentation.Haddock.Types Methods (==) :: TableRow id -> TableRow id -> Bool Source # (/=) :: TableRow id -> TableRow id -> Bool Source #

data Table id Source #

Constructors

Table |

Fields

- tableHeaderRows :: [TableRow id]
- tableBodyRows :: [TableRow id]

#### Instances

Instances details

Functor Table Source # |
Instance details Defined in Documentation.Haddock.Types Methods fmap :: (a -> b) -> Table a -> Table b Source # (<$) :: a -> Table b -> Table a Source #
Foldable Table Source # |

Instance details

Defined in Documentation.Haddock.Types

Methods

fold :: Monoid m => Table m -> m Source #

foldMap :: Monoid m => (a -> m) -> Table a -> m Source #

foldMap' :: Monoid m => (a -> m) -> Table a -> m Source #

foldr :: (a -> b -> b) -> b -> Table a -> b Source #

foldr' :: (a -> b -> b) -> b -> Table a -> b Source #

foldl :: (b -> a -> b) -> b -> Table a -> b Source #

foldl' :: (b -> a -> b) -> b -> Table a -> b Source #

foldr1 :: (a -> a -> a) -> Table a -> a Source #

foldl1 :: (a -> a -> a) -> Table a -> a Source #

toList :: Table a -> [a] Source #

null :: Table a -> Bool Source #

length :: Table a -> Int Source #

elem :: Eq a => a -> Table a -> Bool Source #

maximum :: Ord a => Table a -> a Source #

minimum :: Ord a => Table a -> a Source #

sum :: Num a => Table a -> a Source #

product :: Num a => Table a -> a Source #

Traversable Table Source # |
Instance details Defined in Documentation.Haddock.Types Methods traverse :: Applicative f => (a -> f b) -> Table a -> f (Table b) Source # sequenceA :: Applicative f => Table (f a) -> f (Table a) Source # mapM :: Monad m => (a -> m b) -> Table a -> m (Table b) Source # sequence :: Monad m => Table (m a) -> m (Table a) Source #
Show id => Show (Table id) Source # |
Instance details Defined in Documentation.Haddock.Types Methods showsPrec :: Int -> Table id -> ShowS Source # show :: Table id -> String Source # showList :: [Table id] -> ShowS Source #
Eq id => Eq (Table id) Source # |
Instance details Defined in Documentation.Haddock.Types Methods (==) :: Table id -> Table id -> Bool Source # (/=) :: Table id -> Table id -> Bool Source #

data DocH mod id Source #

Constructors

DocEmpty |
DocAppend (DocH mod id) (DocH mod id) |
DocString String |
DocParagraph (DocH mod id) |
DocIdentifier id |
DocIdentifierUnchecked mod | A qualified identifier that couldn't be resolved.
DocModule (ModLink (DocH mod id)) | A link to a module, with an optional label.
DocWarning (DocH mod id) | This constructor has no counterpart in Haddock markup.
DocEmphasis (DocH mod id) |
DocMonospaced (DocH mod id) |
DocBold (DocH mod id) |
DocUnorderedList [DocH mod id] |
DocOrderedList [(Int, DocH mod id)] |
DocDefList [(DocH mod id, DocH mod id)] |
DocCodeBlock (DocH mod id) |
DocHyperlink (Hyperlink (DocH mod id)) |
DocPic Picture |
DocMathInline String |
DocMathDisplay String |
DocAName String | A (HTML) anchor. It must not contain any spaces.
DocProperty String |
DocExamples [Example] |
DocHeader (Header (DocH mod id)) |
DocTable (Table (DocH mod id)) |

#### Instances

Instances details

Bifoldable DocH Source # | NOTE: Only defined for `base >= 4.10.0`
Instance details Defined in Documentation.Haddock.Types Methods bifold :: Monoid m => DocH m m -> m Source # bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> DocH a b -> m Source # bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c Source # bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> DocH a b -> c Source #
Bifunctor DocH Source # | NOTE: Only defined for `base >= 4.8.0`
Instance details Defined in Documentation.Haddock.Types Methods bimap :: (a -> b) -> (c -> d) -> DocH a c -> DocH b d Source # first :: (a -> b) -> DocH a c -> DocH b c Source # second :: (b -> c) -> DocH a b -> DocH a c Source #
Bitraversable DocH Source # | NOTE: Only defined for `base >= 4.10.0`
Instance details Defined in Documentation.Haddock.Types Methods bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d) Source #
Functor (DocH mod) Source # |
Instance details Defined in Documentation.Haddock.Types Methods fmap :: (a -> b) -> DocH mod a -> DocH mod b Source # (<$) :: a -> DocH mod b -> DocH mod a Source #
Foldable (DocH mod) Source # |

Instance details

Defined in Documentation.Haddock.Types

Methods

fold :: Monoid m => DocH mod m -> m Source #

foldMap :: Monoid m => (a -> m) -> DocH mod a -> m Source #

foldMap' :: Monoid m => (a -> m) -> DocH mod a -> m Source #

foldr :: (a -> b -> b) -> b -> DocH mod a -> b Source #

foldr' :: (a -> b -> b) -> b -> DocH mod a -> b Source #

foldl :: (b -> a -> b) -> b -> DocH mod a -> b Source #

foldl' :: (b -> a -> b) -> b -> DocH mod a -> b Source #

foldr1 :: (a -> a -> a) -> DocH mod a -> a Source #

foldl1 :: (a -> a -> a) -> DocH mod a -> a Source #

toList :: DocH mod a -> [a] Source #

null :: DocH mod a -> Bool Source #

length :: DocH mod a -> Int Source #

elem :: Eq a => a -> DocH mod a -> Bool Source #

maximum :: Ord a => DocH mod a -> a Source #

minimum :: Ord a => DocH mod a -> a Source #

sum :: Num a => DocH mod a -> a Source #

product :: Num a => DocH mod a -> a Source #

Traversable (DocH mod) Source # |
Instance details Defined in Documentation.Haddock.Types Methods traverse :: Applicative f => (a -> f b) -> DocH mod a -> f (DocH mod b) Source # sequenceA :: Applicative f => DocH mod (f a) -> f (DocH mod a) Source # mapM :: Monad m => (a -> m b) -> DocH mod a -> m (DocH mod b) Source # sequence :: Monad m => DocH mod (m a) -> m (DocH mod a) Source #
(Show id, Show mod) => Show (DocH mod id) Source # |
Instance details Defined in Documentation.Haddock.Types Methods showsPrec :: Int -> DocH mod id -> ShowS Source # show :: DocH mod id -> String Source # showList :: [DocH mod id] -> ShowS Source #
(Eq id, Eq mod) => Eq (DocH mod id) Source # |
Instance details Defined in Documentation.Haddock.Types Methods (==) :: DocH mod id -> DocH mod id -> Bool Source # (/=) :: DocH mod id -> DocH mod id -> Bool Source #

data Namespace Source #

The namespace qualification for an identifier.

Constructors

Value |
Type |
None |

#### Instances

Instances details

Enum Namespace Source # |

Instance details

Defined in Documentation.Haddock.Types

Methods

succ :: Namespace -> Namespace Source #

pred :: Namespace -> Namespace Source #

toEnum :: Int -> Namespace Source #

fromEnum :: Namespace -> Int Source #

enumFrom :: Namespace -> [Namespace] Source #

enumFromThen :: Namespace -> Namespace -> [Namespace] Source #

enumFromTo :: Namespace -> Namespace -> [Namespace] Source #

enumFromThenTo :: Namespace -> Namespace -> Namespace -> [Namespace] Source #

Show Namespace Source # |
Instance details Defined in Documentation.Haddock.Types Methods showsPrec :: Int -> Namespace -> ShowS Source # show :: Namespace -> String Source # showList :: [Namespace] -> ShowS Source #
Eq Namespace Source # |
Instance details Defined in Documentation.Haddock.Types Methods (==) :: Namespace -> Namespace -> Bool Source # (/=) :: Namespace -> Namespace -> Bool Source #
Ord Namespace Source # |

Instance details

Defined in Documentation.Haddock.Types

Methods

compare :: Namespace -> Namespace -> Ordering Source #

(<) :: Namespace -> Namespace -> Bool Source #

(<=) :: Namespace -> Namespace -> Bool Source #

(>) :: Namespace -> Namespace -> Bool Source #

(>=) :: Namespace -> Namespace -> Bool Source #

max :: Namespace -> Namespace -> Namespace Source #

min :: Namespace -> Namespace -> Namespace Source #

renderNs :: Namespace -> String Source #

Render the a namespace into the same format it was initially parsed.

data DocMarkupH mod id a Source #

`DocMarkupH` is a set of instructions for marking up documentation. In fact, it's really just a mapping from `Doc` to some other type [a], where [a] is usually the type of the output (HTML, say). Use `markup` to apply a `DocMarkupH` to a `DocH`.

Since: 1.4.5

Constructors

Markup |

Fields

- markupEmpty :: a
- markupString :: String -> a
- markupParagraph :: a -> a
- markupAppend :: a -> a -> a
- markupIdentifier :: id -> a
- markupIdentifierUnchecked :: mod -> a
- markupModule :: ModLink a -> a
- markupWarning :: a -> a
- markupEmphasis :: a -> a
- markupBold :: a -> a
- markupMonospaced :: a -> a
- markupUnorderedList :: [a] -> a
- markupOrderedList :: [(Int, a)] -> a
- markupDefList :: [(a, a)] -> a
- markupCodeBlock :: a -> a
- markupHyperlink :: Hyperlink a -> a
- markupAName :: String -> a
- markupPic :: Picture -> a
- markupMathInline :: String -> a
- markupMathDisplay :: String -> a
- markupProperty :: String -> a
- markupExample :: [Example] -> a
- markupHeader :: Header a -> a
- markupTable :: Table a -> a