-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Library exposing some functionality of Haddock.
--   
--   Haddock is a documentation-generation tool for Haskell libraries.
--   These modules expose some functionality of it without pulling in the
--   GHC dependency. Please note that the API is likely to change so
--   specify upper bounds in your project if you can't release often. For
--   interacting with Haddock itself, see the ‘haddock’ package.
@package haddock-library
@version 1.1.1


-- | Exposes documentation data types used for (some) of Haddock.
module Documentation.Haddock.Types
data Hyperlink
Hyperlink :: String -> Maybe String -> Hyperlink
hyperlinkUrl :: Hyperlink -> String
hyperlinkLabel :: Hyperlink -> Maybe String
data Picture
Picture :: String -> Maybe String -> Picture
pictureUri :: Picture -> String
pictureTitle :: Picture -> Maybe String
data Header id
Header :: Int -> id -> Header id
headerLevel :: Header id -> Int
headerTitle :: Header id -> id
data Example
Example :: String -> [String] -> Example
exampleExpression :: Example -> String
exampleResult :: Example -> [String]
data DocH mod id
DocEmpty :: DocH mod id
DocAppend :: (DocH mod id) -> (DocH mod id) -> DocH mod id
DocString :: String -> DocH mod id
DocParagraph :: (DocH mod id) -> DocH mod id
DocIdentifier :: id -> DocH mod id
DocIdentifierUnchecked :: mod -> DocH mod id
DocModule :: String -> DocH mod id
DocWarning :: (DocH mod id) -> DocH mod id
DocEmphasis :: (DocH mod id) -> DocH mod id
DocMonospaced :: (DocH mod id) -> DocH mod id
DocBold :: (DocH mod id) -> DocH mod id
DocUnorderedList :: [DocH mod id] -> DocH mod id
DocOrderedList :: [DocH mod id] -> DocH mod id
DocDefList :: [(DocH mod id, DocH mod id)] -> DocH mod id
DocCodeBlock :: (DocH mod id) -> DocH mod id
DocHyperlink :: Hyperlink -> DocH mod id
DocPic :: Picture -> DocH mod id
DocAName :: String -> DocH mod id
DocProperty :: String -> DocH mod id
DocExamples :: [Example] -> DocH mod id
DocHeader :: (Header (DocH mod id)) -> DocH mod id
instance (Eq a, Eq b) => Eq (DocH a b)
instance Eq a => Eq (Header a)
instance (Show a, Show b) => Show (DocH a b)
instance Show a => Show (Header a)
instance Eq Hyperlink
instance Show Hyperlink
instance Eq Picture
instance Show Picture
instance Functor Header
instance Eq Example
instance Show Example
instance Functor (DocH mod)
instance Foldable (DocH mod)
instance Traversable (DocH mod)
instance Traversable Header
instance Foldable Header

module Documentation.Haddock.Doc
docParagraph :: DocH mod id -> DocH mod id
docAppend :: DocH mod id -> DocH mod id -> DocH mod id
docConcat :: [DocH mod id] -> DocH mod id


-- | Parser used for Haddock comments. For external users of this library,
--   the most commonly used combination of functions is going to be
--   
--   <pre>
--   <a>toRegular</a> . <a>parseParas</a>
--   </pre>
module Documentation.Haddock.Parser

-- | Parse a text paragraph. Actually just a wrapper over
--   <a>parseStringBS</a> which drops leading whitespace and encodes the
--   string to UTF8 first.
parseString :: String -> DocH mod Identifier

-- | Main entry point to the parser. Appends the newline character to the
--   input string.
parseParas :: String -> DocH mod Identifier

-- | Maps over <a>DocIdentifier</a>s over <a>String</a> with potentially
--   failing conversion using user-supplied function. If the conversion
--   fails, the identifier is deemed to not be valid and is treated as a
--   regular string.
overIdentifier :: (String -> Maybe a) -> DocH mod Identifier -> DocH mod a

-- | Drops the quotes/backticks around all identifiers, as if they were
--   valid but still <a>String</a>s.
toRegular :: DocH mod Identifier -> DocH mod String

-- | Identifier string surrounded with opening and closing
--   quotes/backticks.
type Identifier = (Char, String, Char)
