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 |
Language | Haskell2010 |
Exposes documentation data types used for (some) of Haddock.
Synopsis
- data Meta = Meta {}
- data MetaDoc mod id = MetaDoc {}
- 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 = Hyperlink {}
- data Picture = Picture {}
- data Header id = Header {
- headerLevel :: Int
- headerTitle :: id
- data Example = Example {}
- 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 String
- | DocWarning (DocH mod id)
- | 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
- | DocPic Picture
- | DocMathInline String
- | DocMathDisplay String
- | DocAName String
- | DocProperty String
- | DocExamples [Example]
- | DocHeader (Header (DocH mod id))
- | DocTable (Table (DocH mod id))
- 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 :: String -> a
- markupWarning :: a -> a
- markupEmphasis :: a -> a
- markupBold :: a -> a
- markupMonospaced :: a -> a
- markupUnorderedList :: [a] -> a
- markupOrderedList :: [a] -> a
- markupDefList :: [(a, a)] -> a
- markupCodeBlock :: a -> a
- markupHyperlink :: Hyperlink -> 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
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.
Instances
Bitraversable MetaDoc Source # | |
Defined in Documentation.Haddock.Types bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> MetaDoc a b -> f (MetaDoc c d) # | |
Bifoldable MetaDoc Source # | |
Bifunctor MetaDoc Source # | |
Functor (MetaDoc mod) Source # | |
Foldable (MetaDoc mod) Source # | |
Defined in Documentation.Haddock.Types fold :: Monoid m => MetaDoc mod m -> 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 # | |
Traversable (MetaDoc mod) Source # | |
Defined in Documentation.Haddock.Types | |
(Eq id, Eq mod) => Eq (MetaDoc mod id) Source # | |
(Show id, Show mod) => Show (MetaDoc mod id) Source # | |
Header | |
|
Instances
Functor Header Source # | |
Foldable Header Source # | |
Defined in Documentation.Haddock.Types fold :: Monoid m => Header m -> 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 # elem :: Eq a => a -> Header a -> Bool # maximum :: Ord a => Header a -> a # minimum :: Ord a => Header a -> a # | |
Traversable Header Source # | |
Eq id => Eq (Header id) Source # | |
Show id => Show (Header id) Source # | |
TableCell | |
|
Instances
Functor TableCell Source # | |
Foldable TableCell Source # | |
Defined in Documentation.Haddock.Types fold :: Monoid m => TableCell m -> 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] # length :: TableCell a -> Int # elem :: Eq a => a -> TableCell a -> Bool # maximum :: Ord a => TableCell a -> a # minimum :: Ord a => TableCell a -> a # | |
Traversable TableCell Source # | |
Defined in Documentation.Haddock.Types | |
Eq id => Eq (TableCell id) Source # | |
Show id => Show (TableCell id) Source # | |
TableRow | |
|
Instances
Functor TableRow Source # | |
Foldable TableRow Source # | |
Defined in Documentation.Haddock.Types fold :: Monoid m => TableRow m -> 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 # elem :: Eq a => a -> TableRow a -> Bool # maximum :: Ord a => TableRow a -> a # minimum :: Ord a => TableRow a -> a # | |
Traversable TableRow Source # | |
Eq id => Eq (TableRow id) Source # | |
Show id => Show (TableRow id) Source # | |
Table | |
|
Instances
Functor Table Source # | |
Foldable Table Source # | |
Defined in Documentation.Haddock.Types fold :: Monoid m => Table m -> 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 # elem :: Eq a => a -> Table a -> Bool # maximum :: Ord a => Table a -> a # minimum :: Ord a => Table a -> a # | |
Traversable Table Source # | |
Eq id => Eq (Table id) Source # | |
Show id => Show (Table id) Source # | |
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 String | |
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 | |
DocPic Picture | |
DocMathInline String | |
DocMathDisplay String | |
DocAName String | A (HTML) anchor. |
DocProperty String | |
DocExamples [Example] | |
DocHeader (Header (DocH mod id)) | |
DocTable (Table (DocH mod id)) |
Instances
Bitraversable DocH Source # | |
Defined in Documentation.Haddock.Types bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d) # | |
Bifoldable DocH Source # | |
Bifunctor DocH Source # | |
Functor (DocH mod) Source # | |
Foldable (DocH mod) Source # | |
Defined in Documentation.Haddock.Types fold :: Monoid m => DocH mod m -> 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 # elem :: Eq a => a -> DocH mod a -> Bool # maximum :: Ord a => DocH mod a -> a # minimum :: Ord a => DocH mod a -> a # | |
Traversable (DocH mod) Source # | |
(Eq id, Eq mod) => Eq (DocH mod id) Source # | |
(Show id, Show mod) => Show (DocH mod id) Source # | |
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: haddock-library-1.4.5
Markup | |
|