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 #

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

data MetaDoc mod id #

Constructors

MetaDoc |

Fields

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

#### Instances

Instances details

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

Instance details

Defined in Documentation.Haddock.Types

Methods

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

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

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

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

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

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

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

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

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

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

null :: MetaDoc mod a -> Bool #

length :: MetaDoc mod a -> Int #

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

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

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

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

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

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

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 #

Constructors

Hyperlink |

Fields

- hyperlinkUrl :: String
- hyperlinkLabel :: Maybe id

#### Instances

Instances details

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

Instance details

Defined in Documentation.Haddock.Types

Methods

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

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

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

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

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

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

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

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

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

toList :: Hyperlink a -> [a] #

null :: Hyperlink a -> Bool #

length :: Hyperlink a -> Int #

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

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

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

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

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

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

data ModLink id #

Constructors

ModLink |

Fields

- modLinkName :: String
- modLinkLabel :: Maybe id

#### Instances

Instances details

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

Instance details

Defined in Documentation.Haddock.Types

Methods

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

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

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

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

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

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

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

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

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

toList :: ModLink a -> [a] #

null :: ModLink a -> Bool #

length :: ModLink a -> Int #

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

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

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

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

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

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

data Picture #

Constructors

Picture |

Fields

- pictureUri :: String
- pictureTitle :: Maybe String

#### Instances

Instances details

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

data Header id #

Constructors

Header |

Fields

- headerLevel :: Int

  between 1 and 6 inclusive

- headerTitle :: id

#### Instances

Instances details

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

Instance details

Defined in Documentation.Haddock.Types

Methods

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

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

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

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

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

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

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

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

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

toList :: Header a -> [a] #

null :: Header a -> Bool #

length :: Header a -> Int #

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

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

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

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

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

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

data Example #

Constructors

Example |

Fields

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

#### Instances

Instances details

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

data TableCell id #

Constructors

TableCell |

Fields

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

#### Instances

Instances details

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

Instance details

Defined in Documentation.Haddock.Types

Methods

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

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

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

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

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

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

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

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

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

toList :: TableCell a -> [a] #

null :: TableCell a -> Bool #

length :: TableCell a -> Int #

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

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

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

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

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

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

newtype TableRow id #

Constructors

TableRow |

Fields

- tableRowCells :: [TableCell id]

#### Instances

Instances details

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

Instance details

Defined in Documentation.Haddock.Types

Methods

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

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

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

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

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

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

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

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

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

toList :: TableRow a -> [a] #

null :: TableRow a -> Bool #

length :: TableRow a -> Int #

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

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

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

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

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

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

data Table id #

Constructors

Table |

Fields

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

#### Instances

Instances details

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

Instance details

Defined in Documentation.Haddock.Types

Methods

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

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

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

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

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

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

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

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

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

toList :: Table a -> [a] #

null :: Table a -> Bool #

length :: Table a -> Int #

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

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

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

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

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

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

data DocH mod id #

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 # | NOTE: Only defined for `base >= 4.10.0`
Instance details Defined in Documentation.Haddock.Types Methods bifold :: Monoid m => DocH m m -> m # bifoldMap :: Monoid m => (a -> m) -> (b -> m) -> DocH a b -> m # bifoldr :: (a -> c -> c) -> (b -> c -> c) -> c -> DocH a b -> c # bifoldl :: (c -> a -> c) -> (c -> b -> c) -> c -> DocH a b -> c #
Bifunctor DocH # | 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 # first :: (a -> b) -> DocH a c -> DocH b c # second :: (b -> c) -> DocH a b -> DocH a c #
Bitraversable DocH # | 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) #
Functor (DocH mod) # |
Instance details Defined in Documentation.Haddock.Types Methods fmap :: (a -> b) -> DocH mod a -> DocH mod b # (<$) :: a -> DocH mod b -> DocH mod a #
Foldable (DocH mod) # |

Instance details

Defined in Documentation.Haddock.Types

Methods

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

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

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

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

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

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

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

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

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

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

null :: DocH mod a -> Bool #

length :: DocH mod a -> Int #

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

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

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

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

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

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

data Namespace #

The namespace qualification for an identifier.

Constructors

Value |
Type |
None |

#### Instances

Instances details

Enum Namespace # |

Instance details

Defined in Documentation.Haddock.Types

Methods

succ :: Namespace -> Namespace #

pred :: Namespace -> Namespace #

toEnum :: Int -> Namespace #

fromEnum :: Namespace -> Int #

enumFrom :: Namespace -> [Namespace] #

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

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

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

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

renderNs :: Namespace -> String #

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

data DocMarkupH mod id a #

`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