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 |
Exposes documentation data types used for (some) of Haddock.
Synopsis
- data MetaSince = MetaSince {}
- 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 id = Hyperlink {
- hyperlinkUrl :: String
- hyperlinkLabel :: Maybe id
- data ModLink id = ModLink {
- modLinkName :: String
- modLinkLabel :: Maybe id
- 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 (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
- 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
A @since
declaration.
MetaSince | |
|
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
Bifoldable MetaDoc Source # | |
Defined in Documentation.Haddock.Types | |
Bifunctor MetaDoc Source # | |
Bitraversable MetaDoc Source # | |
Defined in Documentation.Haddock.Types bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> MetaDoc a b -> f (MetaDoc c d) 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 # 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 | |
(Show id, Show mod) => Show (MetaDoc mod id) Source # | |
(Eq id, Eq mod) => Eq (MetaDoc mod id) Source # | |
Hyperlink | |
|
Instances
Functor Hyperlink Source # | |
Foldable Hyperlink Source # | |
Defined in Documentation.Haddock.Types 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] # length :: Hyperlink a -> Int # elem :: Eq a => a -> Hyperlink a -> Bool # maximum :: Ord a => Hyperlink a -> a # minimum :: Ord a => Hyperlink a -> a # | |
Traversable Hyperlink Source # | |
Defined in Documentation.Haddock.Types | |
Show id => Show (Hyperlink id) Source # | |
Eq id => Eq (Hyperlink id) Source # | |
ModLink | |
|
Instances
Functor ModLink Source # | |
Foldable ModLink Source # | |
Defined in Documentation.Haddock.Types 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 # elem :: Eq a => a -> ModLink a -> Bool # maximum :: Ord a => ModLink a -> a # minimum :: Ord a => ModLink a -> a # | |
Traversable ModLink Source # | |
Show id => Show (ModLink id) Source # | |
Eq id => Eq (ModLink id) Source # | |
Instances
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 # 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 # | |
Show id => Show (Header id) Source # | |
Eq id => Eq (Header id) Source # | |
Instances
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 # 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 | |
Show id => Show (TableCell id) Source # | |
Eq id => Eq (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 # 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 # | |
Show id => Show (TableRow id) Source # | |
Eq id => Eq (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 # 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 # | |
Show id => Show (Table id) Source # | |
Eq id => Eq (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 (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
Bifoldable DocH Source # | |
Bifunctor DocH Source # | |
Bitraversable DocH Source # | |
Defined in Documentation.Haddock.Types bitraverse :: Applicative f => (a -> f c) -> (b -> f d) -> DocH a b -> f (DocH c d) 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 # 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 # | |
(Show id, Show mod) => Show (DocH mod id) Source # | |
(Eq id, Eq mod) => Eq (DocH mod id) Source # | |
The namespace qualification for an identifier.
Instances
Enum Namespace Source # | |
Defined in Documentation.Haddock.Types succ :: Namespace -> Namespace # pred :: Namespace -> Namespace # fromEnum :: Namespace -> Int # enumFrom :: Namespace -> [Namespace] # enumFromThen :: Namespace -> Namespace -> [Namespace] # enumFromTo :: Namespace -> Namespace -> [Namespace] # enumFromThenTo :: Namespace -> Namespace -> Namespace -> [Namespace] # | |
Show Namespace Source # | |
Eq Namespace Source # | |
Ord Namespace Source # | |
Defined in Documentation.Haddock.Types |
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: haddock-library-1.4.5
Markup | |
|