haddock-library-1.10.0: Library exposing some functionality of Haddock.
Copyright(c) Simon Marlow 2003-2006
David Waern 2006-2009
Mateusz Kowalczyk 2013
LicenseBSD-like
Maintainerhaddock@projects.haskellorg
Stabilityexperimental
Portabilityportable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Documentation.Haddock.Types

Description

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

Synopsis

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 

Instances

Instances details
Eq Meta Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

(==) :: Meta -> Meta -> Bool #

(/=) :: Meta -> Meta -> Bool #

Show Meta Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

showsPrec :: Int -> Meta -> ShowS #

show :: Meta -> String #

showList :: [Meta] -> ShowS #

data MetaDoc mod id Source #

Constructors

MetaDoc 

Fields

Instances

Instances details
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) #

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 #

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 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 #

first :: (a -> b) -> MetaDoc a c -> MetaDoc b c #

second :: (b -> c) -> MetaDoc a b -> MetaDoc a c #

Functor (MetaDoc mod) Source # 
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) Source # 
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) Source # 
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) #

(Eq id, Eq mod) => Eq (MetaDoc mod id) Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

(==) :: MetaDoc mod id -> MetaDoc mod id -> Bool #

(/=) :: MetaDoc mod id -> MetaDoc mod id -> Bool #

(Show id, Show mod) => Show (MetaDoc mod id) Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

showsPrec :: Int -> MetaDoc mod id -> ShowS #

show :: MetaDoc mod id -> String #

showList :: [MetaDoc mod id] -> ShowS #

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 #

data Hyperlink id Source #

Constructors

Hyperlink 

Instances

data ModLink id Source #

Constructors

ModLink 

Instances

data Picture Source #

Constructors

Picture 

Instances

Instances details
Eq Picture Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

(==) :: Picture -> Picture -> Bool #

(/=) :: Picture -> Picture -> Bool #

Show Picture Source # 
Instance details

Defined in Documentation.Haddock.Types

data Header id Source #

Constructors

Header 

Fields

Instances

Instances details
Functor Header Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

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

(<$) :: a -> Header b -> Header a #

Foldable Header Source # 
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 Source # 
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) #

Eq id => Eq (Header id) Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

(==) :: Header id -> Header id -> Bool #

(/=) :: Header id -> Header id -> Bool #

Show id => Show (Header id) Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

showsPrec :: Int -> Header id -> ShowS #

show :: Header id -> String #

showList :: [Header id] -> ShowS #

data Example Source #

Constructors

Example 

Instances

Instances details
Eq Example Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

(==) :: Example -> Example -> Bool #

(/=) :: Example -> Example -> Bool #

Show Example Source # 
Instance details

Defined in Documentation.Haddock.Types

data TableCell id Source #

Instances

Instances details
Functor TableCell Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

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

(<$) :: a -> TableCell b -> TableCell a #

Foldable TableCell Source # 
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 Source # 
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) #

Eq id => Eq (TableCell id) Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

(==) :: TableCell id -> TableCell id -> Bool #

(/=) :: TableCell id -> TableCell id -> Bool #

Show id => Show (TableCell id) Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

showsPrec :: Int -> TableCell id -> ShowS #

show :: TableCell id -> String #

showList :: [TableCell id] -> ShowS #

newtype TableRow id Source #

Constructors

TableRow 

Fields

Instances

Instances details
Functor TableRow Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

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

(<$) :: a -> TableRow b -> TableRow a #

Foldable TableRow Source # 
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 Source # 
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) #

Eq id => Eq (TableRow id) Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

(==) :: TableRow id -> TableRow id -> Bool #

(/=) :: TableRow id -> TableRow id -> Bool #

Show id => Show (TableRow id) Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

showsPrec :: Int -> TableRow id -> ShowS #

show :: TableRow id -> String #

showList :: [TableRow id] -> ShowS #

data Table id Source #

Constructors

Table 

Instances

Instances details
Functor Table Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

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

(<$) :: a -> Table b -> Table a #

Foldable Table Source # 
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 Source # 
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) #

Eq id => Eq (Table id) Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

(==) :: Table id -> Table id -> Bool #

(/=) :: Table id -> Table id -> Bool #

Show id => Show (Table id) Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

showsPrec :: Int -> Table id -> ShowS #

show :: Table id -> String #

showList :: [Table id] -> ShowS #

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 [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
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) #

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 #

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 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 #

first :: (a -> b) -> DocH a c -> DocH b c #

second :: (b -> c) -> DocH a b -> DocH a c #

Functor (DocH mod) Source # 
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) Source # 
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) Source # 
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) #

(Eq id, Eq mod) => Eq (DocH mod id) Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

(==) :: DocH mod id -> DocH mod id -> Bool #

(/=) :: DocH mod id -> DocH mod id -> Bool #

(Show id, Show mod) => Show (DocH mod id) Source # 
Instance details

Defined in Documentation.Haddock.Types

Methods

showsPrec :: Int -> DocH mod id -> ShowS #

show :: DocH mod id -> String #

showList :: [DocH mod id] -> ShowS #

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