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


-- | Conversion between markup formats
--   
--   Pandoc is a Haskell library for converting from one markup format to
--   another, and a command-line tool that uses this library. It can read
--   several dialects of Markdown and (subsets of) HTML, reStructuredText,
--   LaTeX, DocBook, JATS, MediaWiki markup, TWiki markup, TikiWiki markup,
--   Creole 1.0, Haddock markup, OPML, Emacs Org-Mode, Emacs Muse,
--   txt2tags, Vimwiki, Word Docx, ODT, and Textile, and it can write
--   Markdown, reStructuredText, XHTML, HTML 5, LaTeX, ConTeXt, DocBook,
--   JATS, OPML, TEI, OpenDocument, ODT, Word docx, RTF, MediaWiki,
--   DokuWiki, ZimWiki, Textile, groff man, groff ms, plain text, Emacs
--   Org-Mode, AsciiDoc, Haddock markup, EPUB (v2 and v3), FictionBook2,
--   InDesign ICML, Muse, LaTeX beamer slides, PowerPoint, and several
--   kinds of HTML/JavaScript slide shows (S5, Slidy, Slideous, DZSlides,
--   reveal.js).
--   
--   In contrast to most existing tools for converting Markdown to HTML,
--   pandoc has a modular design: it consists of a set of readers, which
--   parse text in a given format and produce a native representation of
--   the document, and a set of writers, which convert this native
--   representation into a target format. Thus, adding an input or output
--   format requires only adding a reader or writer.
@package pandoc
@version 2.0.6


-- | Function to convert accented latin letters to their unaccented ascii
--   equivalents (used in constructing HTML identifiers).
module Text.Pandoc.Asciify
toAsciiChar :: Char -> Maybe Char


-- | Emoji symbol lookup from canonical string identifier.
module Text.Pandoc.Emoji
emojis :: Map String String


-- | This module provides data types and functions for warnings and info
--   messages.
module Text.Pandoc.Logging

-- | Verbosity level.
data Verbosity
ERROR :: Verbosity
WARNING :: Verbosity
INFO :: Verbosity
data LogMessage
SkippedContent :: String -> SourcePos -> LogMessage
CouldNotParseYamlMetadata :: String -> SourcePos -> LogMessage
DuplicateLinkReference :: String -> SourcePos -> LogMessage
DuplicateNoteReference :: String -> SourcePos -> LogMessage
NoteDefinedButNotUsed :: String -> SourcePos -> LogMessage
DuplicateIdentifier :: String -> SourcePos -> LogMessage
ReferenceNotFound :: String -> SourcePos -> LogMessage
CircularReference :: String -> SourcePos -> LogMessage
UndefinedToggle :: String -> SourcePos -> LogMessage
ParsingUnescaped :: String -> SourcePos -> LogMessage
CouldNotLoadIncludeFile :: String -> SourcePos -> LogMessage
MacroAlreadyDefined :: String -> SourcePos -> LogMessage
InlineNotRendered :: Inline -> LogMessage
BlockNotRendered :: Block -> LogMessage
DocxParserWarning :: String -> LogMessage
CouldNotFetchResource :: String -> String -> LogMessage
CouldNotDetermineImageSize :: String -> String -> LogMessage
CouldNotConvertImage :: String -> String -> LogMessage
CouldNotDetermineMimeType :: String -> LogMessage
CouldNotConvertTeXMath :: String -> String -> LogMessage
CouldNotParseCSS :: String -> LogMessage
Fetching :: String -> LogMessage
Extracting :: String -> LogMessage
NoTitleElement :: String -> LogMessage
NoLangSpecified :: LogMessage
InvalidLang :: String -> LogMessage
CouldNotHighlight :: String -> LogMessage
MissingCharacter :: String -> LogMessage
Deprecated :: String -> String -> LogMessage
NoTranslation :: String -> LogMessage
CouldNotLoadTranslations :: String -> String -> LogMessage
encodeLogMessages :: [LogMessage] -> ByteString
showLogMessage :: LogMessage -> String
messageVerbosity :: LogMessage -> Verbosity
instance GHC.Generics.Generic Text.Pandoc.Logging.LogMessage
instance GHC.Classes.Ord Text.Pandoc.Logging.LogMessage
instance Data.Data.Data Text.Pandoc.Logging.LogMessage
instance GHC.Classes.Eq Text.Pandoc.Logging.LogMessage
instance GHC.Show.Show Text.Pandoc.Logging.LogMessage
instance GHC.Generics.Generic Text.Pandoc.Logging.Verbosity
instance GHC.Enum.Bounded Text.Pandoc.Logging.Verbosity
instance GHC.Classes.Ord Text.Pandoc.Logging.Verbosity
instance GHC.Enum.Enum Text.Pandoc.Logging.Verbosity
instance Data.Data.Data Text.Pandoc.Logging.Verbosity
instance GHC.Classes.Eq Text.Pandoc.Logging.Verbosity
instance GHC.Read.Read Text.Pandoc.Logging.Verbosity
instance GHC.Show.Show Text.Pandoc.Logging.Verbosity
instance Data.Aeson.Types.ToJSON.ToJSON Text.Pandoc.Logging.LogMessage
instance Data.Aeson.Types.ToJSON.ToJSON Text.Pandoc.Logging.Verbosity
instance Data.Aeson.Types.FromJSON.FromJSON Text.Pandoc.Logging.Verbosity


-- | Mime type lookup for ODT writer.
module Text.Pandoc.MIME
type MimeType = String

-- | Determine mime type appropriate for file path.
getMimeType :: FilePath -> Maybe MimeType

-- | Determime mime type appropriate for file path, defaulting to
--   “application/octet-stream” if nothing else fits.
getMimeTypeDef :: FilePath -> MimeType
extensionFromMimeType :: MimeType -> Maybe String


-- | Definition of a MediaBag object to hold binary resources, and an
--   interface for interacting with it.
module Text.Pandoc.MediaBag

-- | A container for a collection of binary resources, with names and mime
--   types. Note that a <a>MediaBag</a> is a Monoid, so <a>mempty</a> can
--   be used for an empty <a>MediaBag</a>, and <tt>&lt;&gt;</tt> can be
--   used to append two <a>MediaBag</a>s.
data MediaBag

-- | Lookup a media item in a <a>MediaBag</a>, returning mime type and
--   contents.
lookupMedia :: FilePath -> MediaBag -> Maybe (MimeType, ByteString)

-- | Insert a media item into a <a>MediaBag</a>, replacing any existing
--   value with the same name.
insertMedia :: FilePath -> Maybe MimeType -> ByteString -> MediaBag -> MediaBag

-- | Get a list of the file paths stored in a <a>MediaBag</a>, with their
--   corresponding mime types and the lengths in bytes of the contents.
mediaDirectory :: MediaBag -> [(String, MimeType, Int)]
instance Data.Data.Data Text.Pandoc.MediaBag.MediaBag
instance GHC.Base.Monoid Text.Pandoc.MediaBag.MediaBag
instance GHC.Show.Show Text.Pandoc.MediaBag.MediaBag


-- | A prettyprinting library for the production of text documents,
--   including wrapped text, indentated blocks, and tables.
module Text.Pandoc.Pretty
data Doc

-- | Renders a <a>Doc</a>. <tt>render (Just n)</tt> will use a line length
--   of <tt>n</tt> to reflow text on breakable spaces. <tt>render
--   Nothing</tt> will not reflow text.
render :: (IsString a) => Maybe Int -> Doc -> a

-- | A carriage return. Does nothing if we're at the beginning of a line;
--   otherwise inserts a newline.
cr :: Doc

-- | Inserts a blank line unless one exists already. (<tt>blankline
--   &lt;&gt; blankline</tt> has the same effect as <tt>blankline</tt>.
blankline :: Doc

-- | Inserts blank lines unless they exist already. (<tt>blanklines m
--   &lt;&gt; blanklines n</tt> has the same effect as <tt>blanklines (max
--   m n)</tt>.
blanklines :: Int -> Doc

-- | A breaking (reflowable) space.
space :: Doc

-- | A literal string.
text :: String -> Doc

-- | A character.
char :: Char -> Doc

-- | Uses the specified string as a prefix for every line of the inside
--   document (except the first, if not at the beginning of the line).
prefixed :: String -> Doc -> Doc

-- | Makes a <a>Doc</a> flush against the left margin.
flush :: Doc -> Doc

-- | Indents a <a>Doc</a> by the specified number of spaces.
nest :: Int -> Doc -> Doc

-- | A hanging indent. <tt>hang ind start doc</tt> prints <tt>start</tt>,
--   then <tt>doc</tt>, leaving an indent of <tt>ind</tt> spaces on every
--   line but the first.
hang :: Int -> Doc -> Doc -> Doc

-- | <tt>beforeNonBlank d</tt> conditionally includes <tt>d</tt> unless it
--   is followed by blank space.
beforeNonBlank :: Doc -> Doc

-- | Makes a <a>Doc</a> non-reflowable.
nowrap :: Doc -> Doc

-- | Content to print only if it comes at the beginning of a line, to be
--   used e.g. for escaping line-initial <a>.</a> in groff man.
afterBreak :: String -> Doc

-- | Returns the width of a <a>Doc</a>.
offset :: Doc -> Int

-- | Returns the minimal width of a <a>Doc</a> when reflowed at breakable
--   spaces.
minOffset :: Doc -> Int

-- | Returns the height of a block or other <a>Doc</a>.
height :: Doc -> Int

-- | <tt>lblock n d</tt> is a block of width <tt>n</tt> characters, with
--   text derived from <tt>d</tt> and aligned to the left.
lblock :: Int -> Doc -> Doc

-- | Like <a>lblock</a> but aligned centered.
cblock :: Int -> Doc -> Doc

-- | Like <a>lblock</a> but aligned to the right.
rblock :: Int -> Doc -> Doc

-- | An infix synonym for <a>mappend</a>.
(<>) :: Monoid m => m -> m -> m
infixr 6 <>

-- | Concatenate a list of <a>Doc</a>s, putting breakable spaces between
--   them.
(<+>) :: Doc -> Doc -> Doc
infixr 6 <+>

-- | <tt>a $$ b</tt> puts <tt>a</tt> above <tt>b</tt>.
($$) :: Doc -> Doc -> Doc
infixr 5 $$

-- | <tt>a $+$ b</tt> puts <tt>a</tt> above <tt>b</tt>, with a blank line
--   between.
($+$) :: Doc -> Doc -> Doc
infixr 5 $+$

-- | True if the document is empty.
isEmpty :: Doc -> Bool

-- | The empty document.
empty :: Doc

-- | Concatenate a list of <a>Doc</a>s.
cat :: [Doc] -> Doc

-- | Same as <a>cat</a>.
hcat :: [Doc] -> Doc

-- | Same as <a>cat</a>, but putting breakable spaces between the
--   <a>Doc</a>s.
hsep :: [Doc] -> Doc

-- | List version of <a>$$</a>.
vcat :: [Doc] -> Doc

-- | List version of <a>$+$</a>.
vsep :: [Doc] -> Doc

-- | Removes leading blank lines from a <a>Doc</a>.
nestle :: Doc -> Doc

-- | Chomps trailing blank space off of a <a>Doc</a>.
chomp :: Doc -> Doc

-- | Encloses a <a>Doc</a> inside a start and end <a>Doc</a>.
inside :: Doc -> Doc -> Doc -> Doc

-- | Puts a <a>Doc</a> in curly braces.
braces :: Doc -> Doc

-- | Puts a <a>Doc</a> in square brackets.
brackets :: Doc -> Doc

-- | Puts a <a>Doc</a> in parentheses.
parens :: Doc -> Doc

-- | Wraps a <a>Doc</a> in single quotes.
quotes :: Doc -> Doc

-- | Wraps a <a>Doc</a> in double quotes.
doubleQuotes :: Doc -> Doc

-- | Returns width of a character in a monospace font: 0 for a combining
--   character, 1 for a regular character, 2 for an East Asian wide
--   character.
charWidth :: Char -> Int

-- | Get real length of string, taking into account combining and
--   double-wide characters.
realLength :: String -> Int
instance GHC.Classes.Eq Text.Pandoc.Pretty.D
instance GHC.Show.Show Text.Pandoc.Pretty.D
instance GHC.Classes.Eq Text.Pandoc.Pretty.Doc
instance GHC.Show.Show Text.Pandoc.Pretty.Doc
instance GHC.Base.Monoid Text.Pandoc.Pretty.Doc
instance Data.String.IsString Text.Pandoc.Pretty.Doc


-- | ByteString variant of <a>readProcessWithExitCode</a>.
module Text.Pandoc.Process

-- | Version of <a>readProcessWithExitCode</a> that uses lazy bytestrings
--   instead of strings and allows setting environment variables.
--   
--   <tt>readProcessWithExitCode</tt> creates an external process, reads
--   its standard output strictly, waits until the process terminates, and
--   then returns the <a>ExitCode</a> of the process and the standard
--   output. stderr is inherited from the parent.
--   
--   If an asynchronous exception is thrown to the thread executing
--   <tt>readProcessWithExitCode</tt>, the forked process will be
--   terminated and <tt>readProcessWithExitCode</tt> will wait (block)
--   until the process has been terminated.
pipeProcess :: Maybe [(String, String)] -> FilePath -> [String] -> ByteString -> IO (ExitCode, ByteString)


-- | Types for LaTeX tokens and macros.
module Text.Pandoc.Readers.LaTeX.Types
data Tok
Tok :: SourcePos -> TokType -> Text -> Tok
data TokType
CtrlSeq :: Text -> TokType
Spaces :: TokType
Newline :: TokType
Symbol :: TokType
Word :: TokType
Comment :: TokType
Esc1 :: TokType
Esc2 :: TokType
Arg :: Int -> TokType
data Macro
Macro :: ExpansionPoint -> Int -> (Maybe [Tok]) -> [Tok] -> Macro
data ExpansionPoint
ExpandWhenDefined :: ExpansionPoint
ExpandWhenUsed :: ExpansionPoint

-- | The abstract data type <tt>SourcePos</tt> represents source positions.
--   It contains the name of the source (i.e. file name), a line number and
--   a column number. <tt>SourcePos</tt> is an instance of the <a>Show</a>,
--   <a>Eq</a> and <a>Ord</a> class.
data SourcePos :: *
instance GHC.Show.Show Text.Pandoc.Readers.LaTeX.Types.Macro
instance GHC.Show.Show Text.Pandoc.Readers.LaTeX.Types.ExpansionPoint
instance GHC.Classes.Ord Text.Pandoc.Readers.LaTeX.Types.ExpansionPoint
instance GHC.Classes.Eq Text.Pandoc.Readers.LaTeX.Types.ExpansionPoint
instance GHC.Show.Show Text.Pandoc.Readers.LaTeX.Types.Tok
instance GHC.Classes.Ord Text.Pandoc.Readers.LaTeX.Types.Tok
instance GHC.Classes.Eq Text.Pandoc.Readers.LaTeX.Types.Tok
instance GHC.Show.Show Text.Pandoc.Readers.LaTeX.Types.TokType
instance GHC.Classes.Ord Text.Pandoc.Readers.LaTeX.Types.TokType
instance GHC.Classes.Eq Text.Pandoc.Readers.LaTeX.Types.TokType


-- | Utility functions and definitions used by the various Pandoc modules.
module Text.Pandoc.Shared

-- | Split list by groups of one or more sep.
splitBy :: (a -> Bool) -> [a] -> [[a]]
splitByIndices :: [Int] -> [a] -> [[a]]

-- | Split string into chunks divided at specified indices.
splitStringByIndices :: [Int] -> [Char] -> [[Char]]

-- | Replace each occurrence of one sublist in a list with another.
substitute :: (Eq a) => [a] -> [a] -> [a] -> [a]
ordNub :: (Ord a) => [a] -> [a]

-- | Returns an association list of backslash escapes for the designated
--   characters.
backslashEscapes :: [Char] -> [(Char, String)]

-- | Escape a string of characters, using an association list of characters
--   and strings.
escapeStringUsing :: [(Char, String)] -> String -> String

-- | Strip trailing newlines from string.
stripTrailingNewlines :: String -> String

-- | Remove leading and trailing space (including newlines) from string.
trim :: String -> String

-- | Remove leading space (including newlines) from string.
triml :: String -> String

-- | Remove trailing space (including newlines) from string.
trimr :: String -> String

-- | Strip leading and trailing characters from string
stripFirstAndLast :: String -> String

-- | Change CamelCase word to hyphenated lowercase (e.g., camel-case).
camelCaseToHyphenated :: String -> String

-- | Convert number &lt; 4000 to uppercase roman numeral.
toRomanNumeral :: Int -> String

-- | Escape whitespace and some punctuation characters in URI.
escapeURI :: String -> String

-- | Convert tabs to spaces. Tabs will be preserved if tab stop is set to
--   0.
tabFilter :: Int -> Text -> Text

-- | Strip out DOS line endings.
crFilter :: Text -> Text

-- | Parse a date and convert (if possible) to <a>YYYY-MM-DD</a> format. We
--   limit years to the range 1601-9999 (ISO 8601 accepts greater than or
--   equal to 1583, but MS Word only accepts dates starting 1601).
normalizeDate :: String -> Maybe String

-- | Generate infinite lazy list of markers for an ordered list, depending
--   on list attributes.
orderedListMarkers :: (Int, ListNumberStyle, ListNumberDelim) -> [String]

-- | Extract the leading and trailing spaces from inside an inline element
--   and place them outside the element. SoftBreaks count as Spaces for
--   these purposes.
extractSpaces :: (Inlines -> Inlines) -> Inlines -> Inlines

-- | Extract inlines, removing formatting.
removeFormatting :: Walkable Inline a => a -> [Inline]
deNote :: Inline -> Inline

-- | Convert pandoc structure to a string with formatting removed.
--   Footnotes are skipped (since we don't want their contents in link
--   labels).
stringify :: Walkable Inline a => a -> String

-- | Bring all regular text in a pandoc structure to uppercase.
--   
--   This function correctly handles cases where a lowercase character
--   doesn't match to a single uppercase character – e.g. “Straße” would be
--   converted to “STRASSE”, not “STRAßE”.
capitalize :: Walkable Inline a => a -> a

-- | Change final list item from <tt>Para</tt> to <tt>Plain</tt> if the
--   list contains no other <tt>Para</tt> blocks. Like compactify, but
--   operates on <tt>Blocks</tt> rather than <tt>[Block]</tt>.
compactify :: [Blocks] -> [Blocks]

-- | Like <tt>compactify</tt>, but acts on items of definition lists.
compactifyDL :: [(Inlines, [Blocks])] -> [(Inlines, [Blocks])]

-- | Convert a list of lines into a paragraph with hard line breaks. This
--   is useful e.g. for rudimentary support of LineBlock elements in
--   writers.
linesToPara :: [[Inline]] -> Block

-- | Data structure for defining hierarchical Pandoc documents
data Element
Blk :: Block -> Element
Sec :: Int -> [Int] -> Attr -> [Inline] -> [Element] -> Element

-- | Convert list of Pandoc blocks into (hierarchical) list of Elements
hierarchicalize :: [Block] -> [Element]

-- | Generate a unique identifier from a list of inlines. Second argument
--   is a list of already used identifiers.
uniqueIdent :: [Inline] -> Set String -> String

-- | Convert Pandoc inline list to plain text identifier. HTML identifiers
--   must start with a letter, and may contain only letters, digits, and
--   the characters _-.
inlineListToIdentifier :: [Inline] -> String

-- | True if block is a Header block.
isHeaderBlock :: Block -> Bool

-- | Shift header levels up or down.
headerShift :: Int -> Pandoc -> Pandoc

-- | Remove empty paragraphs.
stripEmptyParagraphs :: Pandoc -> Pandoc

-- | Detect if a list is tight.
isTightList :: [[Block]] -> Bool

-- | Set a field of a <a>Meta</a> object. If the field already has a value,
--   convert it into a list with the new value appended to the old
--   value(s).
addMetaField :: ToMetaValue a => String -> a -> Meta -> Meta

-- | Create <a>Meta</a> from old-style title, authors, date. This is
--   provided to ease the transition from the old API.
makeMeta :: [Inline] -> [[Inline]] -> [Inline] -> Meta

-- | Remove soft breaks between East Asian characters.
eastAsianLineBreakFilter :: Pandoc -> Pandoc

-- | Builder for underline. This probably belongs in Builder.hs in
--   pandoc-types. Will be replaced once Underline is an element.
underlineSpan :: Inlines -> Inlines

-- | Render HTML tags.
renderTags' :: [Tag String] -> String

-- | Perform an IO action in a directory, returning to starting directory.
inDirectory :: FilePath -> IO a -> IO a

-- | Remove intermediate "." and ".." directories from a path.
--   
--   <pre>
--   collapseFilePath "./foo" == "foo"
--   collapseFilePath "/bar/../baz" == "/baz"
--   collapseFilePath "/../baz" == "/../baz"
--   collapseFilePath "parent/foo/baz/../bar" ==  "parent/foo/bar"
--   collapseFilePath "parent/foo/baz/../../bar" ==  "parent/bar"
--   collapseFilePath "parent/foo/.." ==  "parent"
--   collapseFilePath "/parent/foo/../../bar" ==  "/bar"
--   </pre>
collapseFilePath :: FilePath -> FilePath
filteredFilesFromArchive :: Archive -> (FilePath -> Bool) -> [(FilePath, ByteString)]

-- | Schemes from <a>http://www.iana.org/assignments/uri-schemes.html</a>
--   plus the unofficial schemes doi, javascript, isbn, pmid.
schemes :: Set String

-- | Check if the string is a valid URL with a IANA or frequently used but
--   unofficial scheme (see <tt>schemes</tt>).
isURI :: String -> Bool
mapLeft :: (a -> b) -> Either a c -> Either b c
blocksToInlines :: [Block] -> [Inline]
blocksToInlines' :: [Block] -> Inlines
safeRead :: (MonadPlus m, Read a) => String -> m a
withTempDir :: String -> (FilePath -> IO a) -> IO a

-- | Version number of pandoc library.
pandocVersion :: String
instance Data.Data.Data Text.Pandoc.Shared.Element
instance GHC.Show.Show Text.Pandoc.Shared.Element
instance GHC.Read.Read Text.Pandoc.Shared.Element
instance GHC.Classes.Eq Text.Pandoc.Shared.Element
instance Text.Pandoc.Walk.Walkable Text.Pandoc.Definition.Inline Text.Pandoc.Shared.Element
instance Text.Pandoc.Walk.Walkable Text.Pandoc.Definition.Block Text.Pandoc.Shared.Element


-- | Exports functions for syntax highlighting.
module Text.Pandoc.Highlighting
highlightingStyles :: [(String, Style)]
languages :: [String]
languagesByExtension :: String -> [String]
highlight :: SyntaxMap -> (FormatOptions -> [SourceLine] -> a) -> Attr -> String -> Either String a

-- | Formats tokens as LaTeX using custom commands inside <tt>|</tt>
--   characters. Assumes that <tt>|</tt> is defined as a short verbatim
--   command by the macros produced by <a>styleToLaTeX</a>. A
--   <tt>KeywordTok</tt> is rendered using <tt>\KeywordTok{..}</tt>, and so
--   on.
formatLaTeXInline :: FormatOptions -> [SourceLine] -> Text

-- | Format tokens as a LaTeX <tt>Highlighting</tt> environment inside a
--   <tt>Shaded</tt> environment. <tt>Highlighting</tt> and <tt>Shaded</tt>
--   are defined by the macros produced by <a>styleToLaTeX</a>.
--   <tt>Highlighting</tt> is a verbatim environment using
--   <tt>fancyvrb</tt>; <tt>\</tt>, <tt>{</tt>, and <tt>}</tt> have their
--   normal meanings inside this environment, so that formatting commands
--   work. <tt>Shaded</tt> is either nothing (if the style's background
--   color is default) or a <tt>snugshade</tt> environment from
--   <tt>framed</tt>, providing a background color for the whole code
--   block, even if it spans multiple pages.
formatLaTeXBlock :: FormatOptions -> [SourceLine] -> Text

-- | Converts a <a>Style</a> to a set of LaTeX macro definitions, which
--   should be placed in the document's preamble. Note: default LaTeX setup
--   doesn't allow boldface typewriter font. To make boldface work in
--   styles, you need to use a different typewriter font. This will work
--   for computer modern:
--   
--   <pre>
--   \DeclareFontShape{OT1}{cmtt}{bx}{n}{&lt;5&gt;&lt;6&gt;&lt;7&gt;&lt;8&gt;&lt;9&gt;&lt;10&gt;&lt;10.95&gt;&lt;12&gt;&lt;14.4&gt;&lt;17.28&gt;&lt;20.74&gt;&lt;24.88&gt;cmttb10}{}
--   </pre>
--   
--   Or, with xelatex:
--   
--   <pre>
--   \usepackage{fontspec}
--   \setmainfont[SmallCapsFont={* Caps}]{Latin Modern Roman}
--   \setsansfont{Latin Modern Sans}
--   \setmonofont[SmallCapsFont={Latin Modern Mono Caps}]{Latin Modern Mono Light}
--   </pre>
styleToLaTeX :: Style -> Text

-- | Format tokens using HTML spans inside <tt>code</tt> tags. For example,
--   A <tt>KeywordTok</tt> is rendered as a span with class <tt>kw</tt>.
--   Short class names correspond to <a>TokenType</a>s as follows:
--   <a>KeywordTok</a> = <tt>kw</tt>, <a>DataTypeTok</a> = <tt>dt</tt>,
--   <a>DecValTok</a> = <tt>dv</tt>, <a>BaseNTok</a> = <tt>bn</tt>,
--   <a>FloatTok</a> = <tt>fl</tt>, <a>CharTok</a> = <tt>ch</tt>,
--   <a>StringTok</a> = <tt>st</tt>, <a>CommentTok</a> = <tt>co</tt>,
--   <a>OtherTok</a> = <tt>ot</tt>, <a>AlertTok</a> = <tt>al</tt>,
--   <a>FunctionTok</a> = <tt>fu</tt>, <a>RegionMarkerTok</a> =
--   <tt>re</tt>, <a>ErrorTok</a> = <tt>er</tt>, <a>ConstantTok</a> =
--   <tt>cn</tt>, <a>SpecialCharTok</a> = <tt>sc</tt>,
--   <a>VerbatimStringTok</a> = <tt>vs</tt>, <a>SpecialStringTok</a> =
--   <tt>ss</tt>, <a>ImportTok</a> = <tt>im</tt>, <a>DocumentationTok</a> =
--   <tt>do</tt>, <a>AnnotationTok</a> = <tt>an</tt>, <a>CommentVarTok</a>
--   = <tt>cv</tt>, <a>VariableTok</a> = <tt>va</tt>, <a>ControlFlowTok</a>
--   = <tt>cf</tt>, <a>OperatorTok</a> = <tt>op</tt>, <a>BuiltInTok</a> =
--   <tt>bu</tt>, <a>ExtensionTok</a> = <tt>ex</tt>, <a>PreprocessorTok</a>
--   = <tt>pp</tt>, <a>AttributeTok</a> = <tt>at</tt>,
--   <a>InformationTok</a> = <tt>in</tt>, <a>WarningTok</a> = <tt>wa</tt>.
--   A <a>NormalTok</a> is not marked up at all.
formatHtmlInline :: FormatOptions -> [SourceLine] -> Html

-- | Format tokens as an HTML <tt>pre</tt> block. Each line is wrapped in
--   an a element with the class ‘source-line’. If line numbering is
--   selected, the surrounding pre is given the class ‘numberSource’, and
--   the resulting html will display line numbers thanks to the included
--   CSS. See the documentation for <a>formatHtmlInline</a> for information
--   about how tokens are encoded.
formatHtmlBlock :: FormatOptions -> [SourceLine] -> Html

-- | Returns CSS for styling highlighted code according to the given style.
styleToCss :: Style -> String

-- | Style based on pygments's default colors.
pygments :: Style

-- | Style based on ultraviolet's espresso_libre.css (dark background).
espresso :: Style

-- | Style based on the popular zenburn vim color scheme
zenburn :: Style

-- | Style based on pygments's tango colors.
tango :: Style

-- | Style based on kate's default colors.
kate :: Style

-- | Style with no colors.
monochrome :: Style

-- | Style based on haddock's source highlighting.
haddock :: Style

-- | A rendering style. This determines how each kind of token is to be
--   rendered, and sets a default color and background color for normal
--   tokens. Line numbers can have a different color and background color.
data Style :: *

-- | Determine skylighting language name from listings language name.
fromListingsLanguage :: String -> Maybe String

-- | Determine listings language name from skylighting language name.
toListingsLanguage :: String -> Maybe String


-- | Data structures and functions for representing markup extensions.
module Text.Pandoc.Extensions

-- | Individually selectable syntax extensions.
data Extension

-- | PHP markdown extra abbreviation definitions
Ext_abbreviations :: Extension

-- | Make all non-alphanumerics escapable
Ext_all_symbols_escapable :: Extension

-- | Enable Text::Amuse extensions to Emacs Muse markup
Ext_amuse :: Extension

-- | Make <a>and</a> escapable
Ext_angle_brackets_escapable :: Extension

-- | ascii-only identifiers for headers
Ext_ascii_identifiers :: Extension

-- | Automatic identifiers for headers
Ext_auto_identifiers :: Extension

-- | Make all absolute URIs into links
Ext_autolink_bare_uris :: Extension

-- | GitHub style ``` code blocks
Ext_backtick_code_blocks :: Extension

-- | Require blank line before a blockquote
Ext_blank_before_blockquote :: Extension

-- | Require blank line before a header
Ext_blank_before_header :: Extension

-- | Bracketed spans with attributes
Ext_bracketed_spans :: Extension

-- | Pandoc/citeproc citations
Ext_citations :: Extension

-- | Definition lists without space between items, and disallow laziness
Ext_compact_definition_lists :: Extension

-- | Definition lists as in pandoc, mmd, php
Ext_definition_lists :: Extension

-- | Newlines in paragraphs are ignored between East Asian wide characters
Ext_east_asian_line_breaks :: Extension

-- | Support emoji like :smile:
Ext_emoji :: Extension

-- | Allow empty paragraphs
Ext_empty_paragraphs :: Extension

-- | Recognise the EPUB extended version of HTML
Ext_epub_html_exts :: Extension

-- | Treat a backslash at EOL as linebreak
Ext_escaped_line_breaks :: Extension

-- | Markdown-style numbered examples
Ext_example_lists :: Extension

-- | Enable fancy list numbers and delimiters
Ext_fancy_lists :: Extension

-- | Allow attributes on fenced code blocks
Ext_fenced_code_attributes :: Extension

-- | Parse fenced code blocks
Ext_fenced_code_blocks :: Extension

-- | Allow fenced div syntax :::
Ext_fenced_divs :: Extension

-- | Pandoc<i>PHP</i>MMD style footnotes
Ext_footnotes :: Extension

-- | Require 4-space indent for list contents
Ext_four_space_rule :: Extension

-- | Automatic identifiers for headers, using GitHub's method for
--   generating identifiers
Ext_gfm_auto_identifiers :: Extension

-- | Grid tables (pandoc, reST)
Ext_grid_tables :: Extension

-- | All newlines become hard line breaks
Ext_hard_line_breaks :: Extension

-- | Explicit header attributes {#id .class k=v}
Ext_header_attributes :: Extension

-- | Newlines in paragraphs are ignored
Ext_ignore_line_breaks :: Extension

-- | A paragraph with just an image is a figure
Ext_implicit_figures :: Extension

-- | Implicit reference links for headers
Ext_implicit_header_references :: Extension

-- | Allow attributes on inline code
Ext_inline_code_attributes :: Extension

-- | Pandoc-style inline notes
Ext_inline_notes :: Extension

-- | Treat underscore inside word as literal
Ext_intraword_underscores :: Extension

-- | Parse LaTeX macro definitions (for math only)
Ext_latex_macros :: Extension

-- | RST style line blocks
Ext_line_blocks :: Extension

-- | link and image attributes
Ext_link_attributes :: Extension

-- | Allow lists without preceding blank
Ext_lists_without_preceding_blankline :: Extension

-- | Enable literate Haskell conventions
Ext_literate_haskell :: Extension

-- | Interpret text inside HTML as markdown iff container has attribute
--   <tt>markdown</tt>
Ext_markdown_attribute :: Extension

-- | Interpret as markdown inside HTML blocks
Ext_markdown_in_html_blocks :: Extension

-- | Multimarkdown style header identifiers [myid]
Ext_mmd_header_identifiers :: Extension

-- | MMD style reference link attributes
Ext_mmd_link_attributes :: Extension

-- | Multimarkdown metadata block
Ext_mmd_title_block :: Extension

-- | Pandoc-style multiline tables
Ext_multiline_tables :: Extension

-- | Use Div blocks for contents of <a>div</a> tags
Ext_native_divs :: Extension

-- | Use Span inlines for contents of <a>span</a>
Ext_native_spans :: Extension

-- | <ul>
--   <li>- = em, - before number = en</li>
--   </ul>
Ext_old_dashes :: Extension

-- | Pandoc title block
Ext_pandoc_title_block :: Extension

-- | Pipe tables (as in PHP markdown extra)
Ext_pipe_tables :: Extension

-- | Allow explicit raw blocks/inlines
Ext_raw_attribute :: Extension

-- | Allow raw HTML
Ext_raw_html :: Extension

-- | Allow raw TeX (other than math)
Ext_raw_tex :: Extension

-- | Shortcut reference links
Ext_shortcut_reference_links :: Extension

-- | Pandoc-style simple tables
Ext_simple_tables :: Extension

-- | <a>Smart</a> quotes, apostrophes, ellipses, dashes
Ext_smart :: Extension

-- | Require space between # and header text
Ext_space_in_atx_header :: Extension

-- | Allow space between two parts of ref link
Ext_spaced_reference_links :: Extension

-- | Make start number of ordered list significant
Ext_startnum :: Extension

-- | Strikeout using ~~this~~ syntax
Ext_strikeout :: Extension

-- | Subscript using ~this~ syntax
Ext_subscript :: Extension

-- | Superscript using ^this^ syntax
Ext_superscript :: Extension

-- | Pandoc-style table captions
Ext_table_captions :: Extension

-- | TeX math between $..$ or $$..$$
Ext_tex_math_dollars :: Extension

-- | TeX math btw \(..\) \[..\]
Ext_tex_math_double_backslash :: Extension

-- | TeX math btw &lt;math&gt; &lt;math&gt;
Ext_tex_math_single_backslash :: Extension

-- | YAML metadata block
Ext_yaml_metadata_block :: Extension
data Extensions
emptyExtensions :: Extensions
extensionsFromList :: [Extension] -> Extensions

-- | Parse a format-specifying string into a markup format and a function
--   that takes Extensions and enables and disables extensions as defined
--   in the format spec.
parseFormatSpec :: String -> Either ParseError (String, Extensions -> Extensions)
extensionEnabled :: Extension -> Extensions -> Bool
enableExtension :: Extension -> Extensions -> Extensions
disableExtension :: Extension -> Extensions -> Extensions

-- | Default extensions from format-describing string.
getDefaultExtensions :: String -> Extensions

-- | Extensions to be used with pandoc-flavored markdown.
pandocExtensions :: Extensions

-- | Extensions to be used with plain text output.
plainExtensions :: Extensions

-- | Language extensions to be used with strict markdown.
strictExtensions :: Extensions

-- | Extensions to be used with github-flavored markdown.
phpMarkdownExtraExtensions :: Extensions

-- | Extensions to be used with github-flavored markdown.
githubMarkdownExtensions :: Extensions

-- | Extensions to be used with multimarkdown.
multimarkdownExtensions :: Extensions
instance Data.Aeson.Types.ToJSON.ToJSON Text.Pandoc.Extensions.Extension
instance Data.Aeson.Types.FromJSON.FromJSON Text.Pandoc.Extensions.Extension
instance GHC.Generics.Generic Text.Pandoc.Extensions.Extension
instance Data.Data.Data Text.Pandoc.Extensions.Extension
instance GHC.Enum.Bounded Text.Pandoc.Extensions.Extension
instance GHC.Classes.Ord Text.Pandoc.Extensions.Extension
instance GHC.Classes.Eq Text.Pandoc.Extensions.Extension
instance GHC.Enum.Enum Text.Pandoc.Extensions.Extension
instance GHC.Read.Read Text.Pandoc.Extensions.Extension
instance GHC.Show.Show Text.Pandoc.Extensions.Extension
instance Data.Aeson.Types.FromJSON.FromJSON Text.Pandoc.Extensions.Extensions
instance Data.Aeson.Types.ToJSON.ToJSON Text.Pandoc.Extensions.Extensions
instance GHC.Generics.Generic Text.Pandoc.Extensions.Extensions
instance Data.Data.Data Text.Pandoc.Extensions.Extensions
instance GHC.Classes.Ord Text.Pandoc.Extensions.Extensions
instance GHC.Classes.Eq Text.Pandoc.Extensions.Extensions
instance GHC.Read.Read Text.Pandoc.Extensions.Extensions
instance GHC.Show.Show Text.Pandoc.Extensions.Extensions
instance GHC.Base.Monoid Text.Pandoc.Extensions.Extensions


-- | Data structures and functions for representing parser and writer
--   options.
module Text.Pandoc.Options
data ReaderOptions
ReaderOptions :: Extensions -> Bool -> Int -> Int -> [String] -> Set String -> String -> TrackChanges -> Bool -> ReaderOptions

-- | Syntax extensions
[readerExtensions] :: ReaderOptions -> Extensions

-- | Standalone document with header
[readerStandalone] :: ReaderOptions -> Bool

-- | Number of columns in terminal
[readerColumns] :: ReaderOptions -> Int

-- | Tab stop
[readerTabStop] :: ReaderOptions -> Int

-- | Default classes for indented code blocks
[readerIndentedCodeClasses] :: ReaderOptions -> [String]

-- | Strings to treat as abbreviations
[readerAbbreviations] :: ReaderOptions -> Set String

-- | Default extension for images
[readerDefaultImageExtension] :: ReaderOptions -> String

-- | Track changes setting for docx
[readerTrackChanges] :: ReaderOptions -> TrackChanges

-- | Strip HTML comments instead of parsing as raw HTML
[readerStripComments] :: ReaderOptions -> Bool
data HTMLMathMethod
PlainMath :: HTMLMathMethod
LaTeXMathML :: (Maybe String) -> HTMLMathMethod
JsMath :: (Maybe String) -> HTMLMathMethod
GladTeX :: HTMLMathMethod
WebTeX :: String -> HTMLMathMethod
MathML :: HTMLMathMethod
MathJax :: String -> HTMLMathMethod
KaTeX :: String -> HTMLMathMethod
data CiteMethod
Citeproc :: CiteMethod
Natbib :: CiteMethod
Biblatex :: CiteMethod

-- | Methods for obfuscating email addresses in HTML.
data ObfuscationMethod
NoObfuscation :: ObfuscationMethod
ReferenceObfuscation :: ObfuscationMethod
JavascriptObfuscation :: ObfuscationMethod

-- | Varieties of HTML slide shows.
data HTMLSlideVariant
S5Slides :: HTMLSlideVariant
SlidySlides :: HTMLSlideVariant
SlideousSlides :: HTMLSlideVariant
DZSlides :: HTMLSlideVariant
RevealJsSlides :: HTMLSlideVariant
NoSlides :: HTMLSlideVariant
data EPUBVersion
EPUB2 :: EPUBVersion
EPUB3 :: EPUBVersion

-- | Options for wrapping text in the output.
data WrapOption

-- | Automatically wrap to width
WrapAuto :: WrapOption

-- | No non-semantic newlines
WrapNone :: WrapOption

-- | Preserve wrapping of input source
WrapPreserve :: WrapOption

-- | Options defining the type of top-level headers.
data TopLevelDivision

-- | Top-level headers become parts
TopLevelPart :: TopLevelDivision

-- | Top-level headers become chapters
TopLevelChapter :: TopLevelDivision

-- | Top-level headers become sections
TopLevelSection :: TopLevelDivision

-- | Top-level type is determined via heuristics
TopLevelDefault :: TopLevelDivision

-- | Options for writers
data WriterOptions
WriterOptions :: Maybe String -> [(String, String)] -> Int -> Bool -> Bool -> HTMLMathMethod -> Bool -> [Int] -> Bool -> Extensions -> Bool -> Int -> WrapOption -> Int -> ObfuscationMethod -> String -> CiteMethod -> Bool -> Maybe Int -> TopLevelDivision -> Bool -> Maybe Style -> Bool -> String -> Maybe String -> [FilePath] -> Int -> Int -> Maybe FilePath -> ReferenceLocation -> SyntaxMap -> WriterOptions

-- | Template to use
[writerTemplate] :: WriterOptions -> Maybe String

-- | Variables to set in template
[writerVariables] :: WriterOptions -> [(String, String)]

-- | Tabstop for conversion btw spaces and tabs
[writerTabStop] :: WriterOptions -> Int

-- | Include table of contents
[writerTableOfContents] :: WriterOptions -> Bool

-- | True if lists should be incremental
[writerIncremental] :: WriterOptions -> Bool

-- | How to print math in HTML
[writerHTMLMathMethod] :: WriterOptions -> HTMLMathMethod

-- | Number sections in LaTeX
[writerNumberSections] :: WriterOptions -> Bool

-- | Starting number for section, subsection, ...
[writerNumberOffset] :: WriterOptions -> [Int]

-- | Put sections in div tags in HTML
[writerSectionDivs] :: WriterOptions -> Bool

-- | Markdown extensions that can be used
[writerExtensions] :: WriterOptions -> Extensions

-- | Use reference links in writing markdown, rst
[writerReferenceLinks] :: WriterOptions -> Bool

-- | Dpi for pixel to<i>from inch</i>cm conversions
[writerDpi] :: WriterOptions -> Int

-- | Option for wrapping text
[writerWrapText] :: WriterOptions -> WrapOption

-- | Characters in a line (for text wrapping)
[writerColumns] :: WriterOptions -> Int

-- | How to obfuscate emails
[writerEmailObfuscation] :: WriterOptions -> ObfuscationMethod

-- | Prefix for section &amp; note ids in HTML and for footnote marks in
--   markdown
[writerIdentifierPrefix] :: WriterOptions -> String

-- | How to print cites
[writerCiteMethod] :: WriterOptions -> CiteMethod

-- | Use <tt><a>q</a></tt> tags for quotes in HTML
[writerHtmlQTags] :: WriterOptions -> Bool

-- | Force header level of slides
[writerSlideLevel] :: WriterOptions -> Maybe Int

-- | Type of top-level divisions
[writerTopLevelDivision] :: WriterOptions -> TopLevelDivision

-- | Use listings package for code
[writerListings] :: WriterOptions -> Bool

-- | Style to use for highlighting (Nothing = no highlighting)
[writerHighlightStyle] :: WriterOptions -> Maybe Style

-- | Use setext headers for levels 1-2 in markdown
[writerSetextHeaders] :: WriterOptions -> Bool

-- | Subdir for epub in OCF
[writerEpubSubdirectory] :: WriterOptions -> String

-- | Metadata to include in EPUB
[writerEpubMetadata] :: WriterOptions -> Maybe String

-- | Paths to fonts to embed
[writerEpubFonts] :: WriterOptions -> [FilePath]

-- | Header level for chapters (separate files)
[writerEpubChapterLevel] :: WriterOptions -> Int

-- | Number of levels to include in TOC
[writerTOCDepth] :: WriterOptions -> Int

-- | Path to reference document if specified
[writerReferenceDoc] :: WriterOptions -> Maybe FilePath

-- | Location of footnotes and references for writing markdown
[writerReferenceLocation] :: WriterOptions -> ReferenceLocation
[writerSyntaxMap] :: WriterOptions -> SyntaxMap

-- | Options for accepting or rejecting MS Word track-changes.
data TrackChanges
AcceptChanges :: TrackChanges
RejectChanges :: TrackChanges
AllChanges :: TrackChanges

-- | Locations for footnotes and references in markdown output
data ReferenceLocation

-- | End of block
EndOfBlock :: ReferenceLocation

-- | prior to next section header (or end of document)
EndOfSection :: ReferenceLocation

-- | at end of document
EndOfDocument :: ReferenceLocation

-- | The default value for this type.
def :: Default a => a

-- | Returns True if the given extension is enabled.
isEnabled :: HasSyntaxExtensions a => Extension -> a -> Bool
instance Data.Aeson.Types.ToJSON.ToJSON Text.Pandoc.Options.ReferenceLocation
instance Data.Aeson.Types.FromJSON.FromJSON Text.Pandoc.Options.ReferenceLocation
instance Data.Aeson.Types.ToJSON.ToJSON Text.Pandoc.Options.TopLevelDivision
instance Data.Aeson.Types.FromJSON.FromJSON Text.Pandoc.Options.TopLevelDivision
instance Data.Aeson.Types.ToJSON.ToJSON Text.Pandoc.Options.WrapOption
instance Data.Aeson.Types.FromJSON.FromJSON Text.Pandoc.Options.WrapOption
instance Data.Aeson.Types.ToJSON.ToJSON Text.Pandoc.Options.TrackChanges
instance Data.Aeson.Types.FromJSON.FromJSON Text.Pandoc.Options.TrackChanges
instance Data.Aeson.Types.ToJSON.ToJSON Text.Pandoc.Options.HTMLSlideVariant
instance Data.Aeson.Types.FromJSON.FromJSON Text.Pandoc.Options.HTMLSlideVariant
instance Data.Aeson.Types.ToJSON.ToJSON Text.Pandoc.Options.ObfuscationMethod
instance Data.Aeson.Types.FromJSON.FromJSON Text.Pandoc.Options.ObfuscationMethod
instance Data.Aeson.Types.ToJSON.ToJSON Text.Pandoc.Options.CiteMethod
instance Data.Aeson.Types.FromJSON.FromJSON Text.Pandoc.Options.CiteMethod
instance Data.Aeson.Types.ToJSON.ToJSON Text.Pandoc.Options.HTMLMathMethod
instance Data.Aeson.Types.FromJSON.FromJSON Text.Pandoc.Options.HTMLMathMethod
instance Data.Aeson.Types.ToJSON.ToJSON Text.Pandoc.Options.ReaderOptions
instance Data.Aeson.Types.FromJSON.FromJSON Text.Pandoc.Options.ReaderOptions
instance GHC.Generics.Generic Text.Pandoc.Options.WriterOptions
instance Data.Data.Data Text.Pandoc.Options.WriterOptions
instance GHC.Show.Show Text.Pandoc.Options.WriterOptions
instance GHC.Generics.Generic Text.Pandoc.Options.ReferenceLocation
instance Data.Data.Data Text.Pandoc.Options.ReferenceLocation
instance GHC.Classes.Eq Text.Pandoc.Options.ReferenceLocation
instance GHC.Read.Read Text.Pandoc.Options.ReferenceLocation
instance GHC.Show.Show Text.Pandoc.Options.ReferenceLocation
instance GHC.Generics.Generic Text.Pandoc.Options.TopLevelDivision
instance Data.Data.Data Text.Pandoc.Options.TopLevelDivision
instance GHC.Classes.Eq Text.Pandoc.Options.TopLevelDivision
instance GHC.Read.Read Text.Pandoc.Options.TopLevelDivision
instance GHC.Show.Show Text.Pandoc.Options.TopLevelDivision
instance GHC.Generics.Generic Text.Pandoc.Options.WrapOption
instance Data.Data.Data Text.Pandoc.Options.WrapOption
instance GHC.Classes.Eq Text.Pandoc.Options.WrapOption
instance GHC.Read.Read Text.Pandoc.Options.WrapOption
instance GHC.Show.Show Text.Pandoc.Options.WrapOption
instance GHC.Generics.Generic Text.Pandoc.Options.ReaderOptions
instance Data.Data.Data Text.Pandoc.Options.ReaderOptions
instance GHC.Read.Read Text.Pandoc.Options.ReaderOptions
instance GHC.Show.Show Text.Pandoc.Options.ReaderOptions
instance GHC.Generics.Generic Text.Pandoc.Options.TrackChanges
instance Data.Data.Data Text.Pandoc.Options.TrackChanges
instance GHC.Classes.Eq Text.Pandoc.Options.TrackChanges
instance GHC.Read.Read Text.Pandoc.Options.TrackChanges
instance GHC.Show.Show Text.Pandoc.Options.TrackChanges
instance GHC.Generics.Generic Text.Pandoc.Options.HTMLSlideVariant
instance Data.Data.Data Text.Pandoc.Options.HTMLSlideVariant
instance GHC.Classes.Eq Text.Pandoc.Options.HTMLSlideVariant
instance GHC.Read.Read Text.Pandoc.Options.HTMLSlideVariant
instance GHC.Show.Show Text.Pandoc.Options.HTMLSlideVariant
instance GHC.Generics.Generic Text.Pandoc.Options.ObfuscationMethod
instance Data.Data.Data Text.Pandoc.Options.ObfuscationMethod
instance GHC.Classes.Eq Text.Pandoc.Options.ObfuscationMethod
instance GHC.Read.Read Text.Pandoc.Options.ObfuscationMethod
instance GHC.Show.Show Text.Pandoc.Options.ObfuscationMethod
instance GHC.Generics.Generic Text.Pandoc.Options.CiteMethod
instance Data.Data.Data Text.Pandoc.Options.CiteMethod
instance GHC.Classes.Eq Text.Pandoc.Options.CiteMethod
instance GHC.Read.Read Text.Pandoc.Options.CiteMethod
instance GHC.Show.Show Text.Pandoc.Options.CiteMethod
instance GHC.Generics.Generic Text.Pandoc.Options.HTMLMathMethod
instance Data.Data.Data Text.Pandoc.Options.HTMLMathMethod
instance GHC.Classes.Eq Text.Pandoc.Options.HTMLMathMethod
instance GHC.Read.Read Text.Pandoc.Options.HTMLMathMethod
instance GHC.Show.Show Text.Pandoc.Options.HTMLMathMethod
instance GHC.Generics.Generic Text.Pandoc.Options.EPUBVersion
instance Data.Data.Data Text.Pandoc.Options.EPUBVersion
instance GHC.Read.Read Text.Pandoc.Options.EPUBVersion
instance GHC.Show.Show Text.Pandoc.Options.EPUBVersion
instance GHC.Classes.Eq Text.Pandoc.Options.EPUBVersion
instance Data.Default.Class.Default Text.Pandoc.Options.WriterOptions
instance Text.Pandoc.Options.HasSyntaxExtensions Text.Pandoc.Options.WriterOptions
instance Text.Pandoc.Options.HasSyntaxExtensions Text.Pandoc.Options.ReaderOptions
instance Data.Default.Class.Default Text.Pandoc.Options.ReaderOptions


-- | Functions for parsing and rendering BCP47 language identifiers.
module Text.Pandoc.BCP47

-- | Get the contents of the <tt>lang</tt> metadata field or variable.
getLang :: WriterOptions -> Meta -> Maybe String

-- | Parse a BCP 47 string as a Lang. Currently we parse extensions and
--   private-use fields as "variants," even though officially they aren't.
parseBCP47 :: String -> Either String Lang

-- | Represents BCP 47 language/country code.
data Lang
Lang :: String -> String -> String -> [String] -> Lang
[langLanguage] :: Lang -> String
[langScript] :: Lang -> String
[langRegion] :: Lang -> String
[langVariants] :: Lang -> [String]

-- | Render a Lang as BCP 47.
renderLang :: Lang -> String
instance GHC.Show.Show Text.Pandoc.BCP47.Lang
instance GHC.Classes.Ord Text.Pandoc.BCP47.Lang
instance GHC.Classes.Eq Text.Pandoc.BCP47.Lang


-- | UTF-8 aware string IO functions that will work with GHC 6.10, 6.12, or
--   7.
module Text.Pandoc.UTF8
readFile :: FilePath -> IO String
getContents :: IO String
writeFileWith :: Newline -> FilePath -> String -> IO ()
writeFile :: FilePath -> String -> IO ()
putStrWith :: Newline -> String -> IO ()
putStr :: String -> IO ()
putStrLnWith :: Newline -> String -> IO ()
putStrLn :: String -> IO ()
hPutStrWith :: Newline -> Handle -> String -> IO ()
hPutStr :: Handle -> String -> IO ()
hPutStrLnWith :: Newline -> Handle -> String -> IO ()
hPutStrLn :: Handle -> String -> IO ()
hGetContents :: Handle -> IO String

-- | Convert UTF8-encoded ByteString to String, also removing '\r'
--   characters.
toString :: ByteString -> String

-- | Convert UTF8-encoded ByteString to Text, also removing '\r'
--   characters.
toText :: ByteString -> Text
fromString :: String -> ByteString
fromText :: Text -> ByteString

-- | Convert UTF8-encoded ByteString to String, also removing '\r'
--   characters.
toStringLazy :: ByteString -> String
fromTextLazy :: Text -> ByteString

-- | Convert UTF8-encoded ByteString to Text, also removing '\r'
--   characters.
toTextLazy :: ByteString -> Text
fromStringLazy :: String -> ByteString
encodePath :: FilePath -> FilePath
decodeArg :: String -> String


-- | Functions for determining the size of a PNG, JPEG, or GIF image.
module Text.Pandoc.ImageSize
data ImageType
Png :: ImageType
Gif :: ImageType
Jpeg :: ImageType
Svg :: ImageType
Pdf :: ImageType
Eps :: ImageType
imageType :: ByteString -> Maybe ImageType
imageSize :: WriterOptions -> ByteString -> Either String ImageSize
sizeInPixels :: ImageSize -> (Integer, Integer)

-- | Calculate (height, width) in points using the image file's dpi
--   metadata, using 72 Points == 1 Inch.
sizeInPoints :: ImageSize -> (Double, Double)

-- | Calculate (height, width) in points, considering the desired
--   dimensions in the attribute, while falling back on the image file's
--   dpi metadata if no dimensions are specified in the attribute (or only
--   dimensions in percentages).
desiredSizeInPoints :: WriterOptions -> Attr -> ImageSize -> (Double, Double)
data Dimension
Pixel :: Integer -> Dimension
Centimeter :: Double -> Dimension
Millimeter :: Double -> Dimension
Inch :: Double -> Dimension
Percent :: Double -> Dimension
Em :: Double -> Dimension
data Direction
Width :: Direction
Height :: Direction

-- | Read a Dimension from an Attr attribute. `dimension Width attr` might
--   return `Just (Pixel 3)` or for example `Just (Centimeter 2.0)`, etc.
dimension :: Direction -> Attr -> Maybe Dimension
lengthToDim :: String -> Maybe Dimension

-- | Scale a dimension by a factor.
scaleDimension :: Double -> Dimension -> Dimension
inInch :: WriterOptions -> Dimension -> Double
inPixel :: WriterOptions -> Dimension -> Integer
inPoints :: WriterOptions -> Dimension -> Double
inEm :: WriterOptions -> Dimension -> Double

-- | Maybe split a string into a leading number and trailing unit, e.g.
--   "3cm" to Just (3.0, "cm")
numUnit :: String -> Maybe (Double, String)

-- | Convert a Dimension to a String denoting its equivalent in inches, for
--   example "2.00000". Note: Dimensions in percentages are converted to
--   the empty string.
showInInch :: WriterOptions -> Dimension -> String

-- | Convert a Dimension to a String denoting its equivalent in pixels, for
--   example "600". Note: Dimensions in percentages are converted to the
--   empty string.
showInPixel :: WriterOptions -> Dimension -> String
showFl :: (RealFloat a) => a -> String
instance GHC.Classes.Ord Text.Pandoc.ImageSize.TagType
instance GHC.Classes.Eq Text.Pandoc.ImageSize.TagType
instance GHC.Show.Show Text.Pandoc.ImageSize.TagType
instance GHC.Show.Show Text.Pandoc.ImageSize.DataFormat
instance GHC.Classes.Eq Text.Pandoc.ImageSize.ImageSize
instance GHC.Show.Show Text.Pandoc.ImageSize.ImageSize
instance GHC.Read.Read Text.Pandoc.ImageSize.ImageSize
instance GHC.Show.Show Text.Pandoc.ImageSize.ImageType
instance Data.Default.Class.Default Text.Pandoc.ImageSize.ImageSize
instance GHC.Show.Show Text.Pandoc.ImageSize.Dimension
instance GHC.Show.Show Text.Pandoc.ImageSize.Direction


-- | This module provides a standard way to deal with possible errors
--   encounted during parsing.
module Text.Pandoc.Error
data PandocError
PandocIOError :: String -> IOError -> PandocError
PandocHttpError :: String -> HttpException -> PandocError
PandocShouldNeverHappenError :: String -> PandocError
PandocSomeError :: String -> PandocError
PandocParseError :: String -> PandocError
PandocParsecError :: Input -> ParseError -> PandocError
PandocMakePDFError :: String -> PandocError
PandocOptionError :: String -> PandocError
PandocSyntaxMapError :: String -> PandocError
PandocFailOnWarningError :: PandocError
PandocPDFProgramNotFoundError :: String -> PandocError
PandocPDFError :: String -> PandocError
PandocFilterError :: String -> String -> PandocError
PandocCouldNotFindDataFileError :: String -> PandocError
PandocResourceNotFound :: String -> PandocError
PandocTemplateError :: String -> PandocError
PandocAppError :: String -> PandocError
PandocEpubSubdirectoryError :: String -> PandocError
PandocMacroLoop :: String -> PandocError

-- | Handle PandocError by exiting with an error message.
handleError :: Either PandocError a -> IO a
instance GHC.Generics.Generic Text.Pandoc.Error.PandocError
instance GHC.Show.Show Text.Pandoc.Error.PandocError
instance GHC.Exception.Exception Text.Pandoc.Error.PandocError


-- | This module defines a type class, <a>PandocMonad</a>, for pandoc
--   readers and writers. A pure instance <a>PandocPure</a> and an impure
--   instance <a>PandocIO</a> are provided. This allows users of the
--   library to choose whether they want conversions to perform IO
--   operations (such as reading include files or images).
module Text.Pandoc.Class

-- | The PandocMonad typeclass contains all the potentially IO-related
--   functions used in pandoc's readers and writers. Instances of this
--   typeclass may implement these functions in IO (as in <a>PandocIO</a>)
--   or using an internal state that represents a file system, time, and so
--   on (as in <a>PandocPure</a>).
class (Functor m, Applicative m, Monad m, MonadError PandocError m) => PandocMonad m

-- | Lookup an environment variable.
lookupEnv :: PandocMonad m => String -> m (Maybe String)

-- | Get the current (UTC) time.
getCurrentTime :: PandocMonad m => m UTCTime

-- | Get the locale's time zone.
getCurrentTimeZone :: PandocMonad m => m TimeZone

-- | Return a new generator for random numbers.
newStdGen :: PandocMonad m => m StdGen

-- | Return a new unique integer.
newUniqueHash :: PandocMonad m => m Int

-- | Retrieve contents and mime type from a URL, raising an error on
--   failure.
openURL :: PandocMonad m => String -> m (ByteString, Maybe MimeType)

-- | Read the lazy ByteString contents from a file path, raising an error
--   on failure.
readFileLazy :: PandocMonad m => FilePath -> m ByteString

-- | Read the strict ByteString contents from a file path, raising an error
--   on failure.
readFileStrict :: PandocMonad m => FilePath -> m ByteString

-- | Return a list of paths that match a glob, relative to the working
--   directory. See <a>Glob</a> for the glob syntax.
glob :: PandocMonad m => String -> m [FilePath]

-- | Returns True if file exists.
fileExists :: PandocMonad m => FilePath -> m Bool

-- | Returns the path of data file.
getDataFileName :: PandocMonad m => FilePath -> m FilePath

-- | Return the modification time of a file.
getModificationTime :: PandocMonad m => FilePath -> m UTCTime

-- | Get the value of the <a>CommonState</a> used by all instances of
--   <a>PandocMonad</a>.
getCommonState :: PandocMonad m => m CommonState

-- | Set the value of the <a>CommonState</a> used by all instances of
--   <a>PandocMonad</a>. | Get the value of a specific field of
--   <a>CommonState</a>.
putCommonState :: PandocMonad m => CommonState -> m ()

-- | Get the value of a specific field of <a>CommonState</a>.
getsCommonState :: PandocMonad m => (CommonState -> a) -> m a

-- | Modify the <a>CommonState</a>.
modifyCommonState :: PandocMonad m => (CommonState -> CommonState) -> m ()
logOutput :: PandocMonad m => LogMessage -> m ()
trace :: PandocMonad m => String -> m ()

-- | <a>CommonState</a> represents state that is used by all instances of
--   <a>PandocMonad</a>. Normally users should not need to interact with it
--   directly; instead, auxiliary functions like <a>setVerbosity</a> and
--   <tt>withMediaBag</tt> should be used.
data CommonState
CommonState :: [LogMessage] -> Maybe FilePath -> Maybe String -> [(String, String)] -> MediaBag -> Maybe (Lang, Maybe Translations) -> [FilePath] -> Maybe FilePath -> [FilePath] -> Verbosity -> Bool -> CommonState

-- | A list of log messages in reverse order
[stLog] :: CommonState -> [LogMessage]

-- | Directory to search for data files
[stUserDataDir] :: CommonState -> Maybe FilePath

-- | Absolute URL + dir of 1st source file
[stSourceURL] :: CommonState -> Maybe String

-- | Headers to add for HTTP requests
[stRequestHeaders] :: CommonState -> [(String, String)]

-- | Media parsed from binary containers
[stMediaBag] :: CommonState -> MediaBag

-- | Translations for localization
[stTranslations] :: CommonState -> Maybe (Lang, Maybe Translations)

-- | List of input files from command line
[stInputFiles] :: CommonState -> [FilePath]

-- | Output file from command line
[stOutputFile] :: CommonState -> Maybe FilePath

-- | Path to search for resources like included images
[stResourcePath] :: CommonState -> [FilePath]

-- | Verbosity level
[stVerbosity] :: CommonState -> Verbosity

-- | Controls whether tracing messages are issued.
[stTrace] :: CommonState -> Bool

-- | The <a>PureState</a> contains ersatz representations of things that
--   would normally be obtained through IO.
data PureState
PureState :: StdGen -> [Word8] -> [Int] -> [(String, String)] -> UTCTime -> TimeZone -> Archive -> Archive -> Archive -> FileTree -> FileTree -> FileTree -> PureState
[stStdGen] :: PureState -> StdGen
[stWord8Store] :: PureState -> [Word8]
[stUniqStore] :: PureState -> [Int]
[stEnv] :: PureState -> [(String, String)]
[stTime] :: PureState -> UTCTime
[stTimeZone] :: PureState -> TimeZone
[stReferenceDocx] :: PureState -> Archive
[stReferencePptx] :: PureState -> Archive
[stReferenceODT] :: PureState -> Archive
[stFiles] :: PureState -> FileTree
[stUserDataFiles] :: PureState -> FileTree
[stCabalDataFiles] :: PureState -> FileTree
getPureState :: PandocPure PureState
getsPureState :: (PureState -> a) -> PandocPure a
putPureState :: PureState -> PandocPure ()
modifyPureState :: (PureState -> PureState) -> PandocPure ()
getPOSIXTime :: PandocMonad m => m POSIXTime
getZonedTime :: PandocMonad m => m ZonedTime

-- | Read file, checking in any number of directories.
readFileFromDirs :: PandocMonad m => [FilePath] -> FilePath -> m (Maybe String)

-- | Log a message using <a>logOutput</a>. Note that <a>logOutput</a> is
--   called only if the verbosity level exceeds the level of the message,
--   but the message is added to the list of log messages that will be
--   retrieved by <a>getLog</a> regardless of its verbosity level.
report :: PandocMonad m => LogMessage -> m ()

-- | Determine whether tracing is enabled. This affects the behavior of
--   <a>trace</a>. If tracing is not enabled, <a>trace</a> does nothing.
setTrace :: PandocMonad m => Bool -> m ()

-- | Set request header to use in HTTP requests.
setRequestHeader :: PandocMonad m => String -> String -> m ()
getLog :: PandocMonad m => m [LogMessage]

-- | Set the verbosity level.
setVerbosity :: PandocMonad m => Verbosity -> m ()

-- | Get the verbosity level.
getVerbosity :: PandocMonad m => m Verbosity
getMediaBag :: PandocMonad m => m MediaBag

-- | Initialize the media bag.
setMediaBag :: PandocMonad m => MediaBag -> m ()
insertMedia :: PandocMonad m => FilePath -> Maybe MimeType -> ByteString -> m ()

-- | Set the user data directory in common state.
setUserDataDir :: PandocMonad m => Maybe FilePath -> m ()

-- | Get the user data directory from common state.
getUserDataDir :: PandocMonad m => m (Maybe FilePath)

-- | Fetch an image or other item from the local filesystem or the net.
--   Returns raw content and maybe mime type.
fetchItem :: PandocMonad m => String -> m (ByteString, Maybe MimeType)
getInputFiles :: PandocMonad m => m [FilePath]
setInputFiles :: PandocMonad m => [FilePath] -> m ()
getOutputFile :: PandocMonad m => m (Maybe FilePath)
setOutputFile :: PandocMonad m => Maybe FilePath -> m ()
setResourcePath :: PandocMonad m => [FilePath] -> m ()
getResourcePath :: PandocMonad m => m [FilePath]
newtype PandocIO a
PandocIO :: ExceptT PandocError (StateT CommonState IO) a -> PandocIO a
[unPandocIO] :: PandocIO a -> ExceptT PandocError (StateT CommonState IO) a
newtype PandocPure a
PandocPure :: ExceptT PandocError (StateT CommonState (State PureState)) a -> PandocPure a
[unPandocPure] :: PandocPure a -> ExceptT PandocError (StateT CommonState (State PureState)) a
newtype FileTree
FileTree :: Map FilePath FileInfo -> FileTree
[unFileTree] :: FileTree -> Map FilePath FileInfo
data FileInfo
FileInfo :: UTCTime -> ByteString -> FileInfo
[infoFileMTime] :: FileInfo -> UTCTime
[infoFileContents] :: FileInfo -> ByteString

-- | Add the specified file to the FileTree. If file is a directory, add
--   its contents recursively.
addToFileTree :: FileTree -> FilePath -> IO FileTree

-- | Insert an ersatz file into the <a>FileTree</a>.
insertInFileTree :: FilePath -> FileInfo -> FileTree -> FileTree

-- | Evaluate a <a>PandocIO</a> operation.
runIO :: PandocIO a -> IO (Either PandocError a)

-- | Evaluate a <a>PandocIO</a> operation, handling any errors by exiting
--   with an appropriate message and error status.
runIOorExplode :: PandocIO a -> IO a
runPure :: PandocPure a -> Either PandocError a

-- | Read file from from Cabal data directory.
readDefaultDataFile :: PandocMonad m => FilePath -> m ByteString

-- | Read file from user data directory or, if not found there, from Cabal
--   data directory.
readDataFile :: PandocMonad m => FilePath -> m ByteString

-- | Fetch local or remote resource (like an image) and provide data
--   suitable for adding it to the MediaBag.
fetchMediaResource :: PandocMonad m => String -> m (FilePath, Maybe MimeType, ByteString)

-- | Traverse tree, filling media bag for any images that aren't already in
--   the media bag.
fillMediaBag :: PandocMonad m => Pandoc -> m Pandoc

-- | Extract media from the mediabag into a directory.
extractMedia :: FilePath -> Pandoc -> PandocIO Pandoc

-- | Convert BCP47 string to a Lang, issuing warning if there are problems.
toLang :: PandocMonad m => Maybe String -> m (Maybe Lang)

-- | Select the language to use with <a>translateTerm</a>. Note that this
--   does not read a translation file; that is only done the first time
--   <a>translateTerm</a> is used.
setTranslations :: PandocMonad m => Lang -> m ()

-- | Get a translation from the current term map. Issue a warning if the
--   term is not defined.
translateTerm :: PandocMonad m => Term -> m String
data Translations
instance Control.Monad.Error.Class.MonadError Text.Pandoc.Error.PandocError Text.Pandoc.Class.PandocPure
instance GHC.Base.Monad Text.Pandoc.Class.PandocPure
instance GHC.Base.Applicative Text.Pandoc.Class.PandocPure
instance GHC.Base.Functor Text.Pandoc.Class.PandocPure
instance GHC.Base.Monoid Text.Pandoc.Class.FileTree
instance Control.Monad.Error.Class.MonadError Text.Pandoc.Error.PandocError Text.Pandoc.Class.PandocIO
instance GHC.Base.Monad Text.Pandoc.Class.PandocIO
instance GHC.Base.Applicative Text.Pandoc.Class.PandocIO
instance GHC.Base.Functor Text.Pandoc.Class.PandocIO
instance Control.Monad.IO.Class.MonadIO Text.Pandoc.Class.PandocIO
instance Text.Pandoc.Class.PandocMonad Text.Pandoc.Class.PandocPure
instance Data.Default.Class.Default Text.Pandoc.Class.PureState
instance Text.Pandoc.Class.PandocMonad Text.Pandoc.Class.PandocIO
instance (Control.Monad.Trans.Class.MonadTrans t, Text.Pandoc.Class.PandocMonad m, GHC.Base.Functor (t m), Control.Monad.Error.Class.MonadError Text.Pandoc.Error.PandocError (t m), GHC.Base.Monad (t m), GHC.Base.Applicative (t m)) => Text.Pandoc.Class.PandocMonad (t m)
instance Text.Pandoc.Class.PandocMonad m => Text.Pandoc.Class.PandocMonad (Text.Parsec.Prim.ParsecT s st m)
instance Data.Default.Class.Default Text.Pandoc.Class.CommonState


-- | A simple templating system with variable substitution and
--   conditionals.
module Text.Pandoc.Templates

-- | Like <a>applyTemplate</a>, but runs in PandocMonad and raises an error
--   if compilation fails.
renderTemplate' :: (PandocMonad m, ToJSON a, TemplateTarget b) => String -> a -> m b

-- | Get default template for the specified writer.
getDefaultTemplate :: PandocMonad m => String -> m String


-- | Functions for converting an HTML file into one that can be viewed
--   offline, by incorporating linked images, CSS, and scripts into the
--   HTML using data URIs.
module Text.Pandoc.SelfContained
makeDataURI :: (MimeType, ByteString) -> String

-- | Convert HTML into self-contained HTML, incorporating images, scripts,
--   and CSS using data: URIs.
makeSelfContained :: PandocMonad m => String -> m String


-- | Entry point to the odt reader.
module Text.Pandoc.Readers.Odt
readOdt :: PandocMonad m => ReaderOptions -> ByteString -> m Pandoc


-- | Conversion of a string representation of a pandoc type
--   (<tt>Pandoc</tt>, <tt>[Block]</tt>, <tt>Block</tt>, <tt>[Inline]</tt>,
--   or <tt>Inline</tt>) to a <tt>Pandoc</tt> document.
module Text.Pandoc.Readers.Native

-- | Read native formatted text and return a Pandoc document. The input may
--   be a full pandoc document, a block list, a block, an inline list, or
--   an inline. Thus, for example,
--   
--   <pre>
--   Str "hi"
--   </pre>
--   
--   will be treated as if it were
--   
--   <pre>
--   Pandoc nullMeta [Plain [Str "hi"]]
--   </pre>
readNative :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

module Text.Pandoc.Readers.JATS
readJATS :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
instance GHC.Show.Show Text.Pandoc.Readers.JATS.JATSState
instance Data.Default.Class.Default Text.Pandoc.Readers.JATS.JATSState
instance Text.Pandoc.Builder.HasMeta Text.Pandoc.Readers.JATS.JATSState


-- | Conversion of Haddock markup to <a>Pandoc</a> document.
module Text.Pandoc.Readers.Haddock

-- | Parse Haddock markup and return a <a>Pandoc</a> document.
readHaddock :: PandocMonad m => ReaderOptions -> Text -> m Pandoc


-- | Conversion of Docx type (defined in Text.Pandoc.Readers.Docx.Parse) to
--   <a>Pandoc</a> document.
module Text.Pandoc.Readers.Docx
readDocx :: PandocMonad m => ReaderOptions -> ByteString -> m Pandoc
instance Data.Default.Class.Default Text.Pandoc.Readers.Docx.DEnv
instance Data.Default.Class.Default Text.Pandoc.Readers.Docx.DState

module Text.Pandoc.Readers.DocBook
readDocBook :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
instance GHC.Show.Show Text.Pandoc.Readers.DocBook.DBState
instance Data.Default.Class.Default Text.Pandoc.Readers.DocBook.DBState
instance Text.Pandoc.Builder.HasMeta Text.Pandoc.Readers.DocBook.DBState


-- | Conversion of CommonMark-formatted plain text to <a>Pandoc</a>
--   document.
--   
--   CommonMark is a strongly specified variant of Markdown:
--   <a>http://commonmark.org</a>.
module Text.Pandoc.Readers.CommonMark

-- | Parse a CommonMark formatted string into a <a>Pandoc</a> structure.
readCommonMark :: PandocMonad m => ReaderOptions -> Text -> m Pandoc


-- | Conversion of <a>Pandoc</a> documents to FB2 (FictionBook2) format.
--   
--   FictionBook is an XML-based e-book format. For more information see:
--   <a>http://www.fictionbook.org/index.php/Eng:XML_Schema_Fictionbook_2.1</a>
module Text.Pandoc.Writers.FB2

-- | Produce an FB2 document from a <a>Pandoc</a> document.
writeFB2 :: PandocMonad m => WriterOptions -> Pandoc -> m Text
instance GHC.Classes.Eq Text.Pandoc.Writers.FB2.ImageMode
instance GHC.Show.Show Text.Pandoc.Writers.FB2.FbRenderState
instance GHC.Show.Show Text.Pandoc.Writers.FB2.ImageMode

module Text.Pandoc.Writers.Math

-- | Converts a raw TeX math formula to a list of <a>Pandoc</a> inlines.
--   Defaults to raw formula between <tt>$</tt> or <tt>$$</tt> characters
--   if entire formula can't be converted.
texMathToInlines :: PandocMonad m => MathType -> String -> m [Inline]

-- | Converts a raw TeX math formula using a writer function, issuing a
--   warning and producing a fallback (a raw string) on failure.
convertMath :: PandocMonad m => (DisplayType -> [Exp] -> a) -> MathType -> String -> m (Either Inline a)
defaultMathJaxURL :: String
defaultKaTeXURL :: String


-- | Conversion of a <a>Pandoc</a> document to a string representation.
module Text.Pandoc.Writers.Native

-- | Prettyprint Pandoc document.
writeNative :: PandocMonad m => WriterOptions -> Pandoc -> m Text

module Text.Pandoc.Writers.OOXML
mknode :: Node t => String -> [(String, String)] -> t -> Element
nodename :: String -> QName
toLazy :: ByteString -> ByteString
renderXml :: Element -> ByteString
parseXml :: (PandocMonad m) => Archive -> Archive -> String -> m Element
elemToNameSpaces :: Element -> NameSpaces
elemName :: NameSpaces -> String -> String -> QName
isElem :: NameSpaces -> String -> String -> Element -> Bool
type NameSpaces = [(String, String)]

-- | Scales the image to fit the page sizes are passed in emu
fitToPage :: (Double, Double) -> Integer -> (Integer, Integer)


-- | Functions for escaping and formatting XML.
module Text.Pandoc.XML

-- | Escape one character as needed for XML.
escapeCharForXML :: Char -> String

-- | Escape string as needed for XML. Entity references are not preserved.
escapeStringForXML :: String -> String

-- | Put the supplied contents between start and end tags of tagType, with
--   specified attributes and (if specified) indentation.
inTags :: Bool -> String -> [(String, String)] -> Doc -> Doc

-- | Return a self-closing tag of tagType with specified attributes
selfClosingTag :: String -> [(String, String)] -> Doc

-- | Put the supplied contents between start and end tags of tagType.
inTagsSimple :: String -> Doc -> Doc

-- | Put the supplied contents in indented block btw start and end tags.
inTagsIndented :: String -> Doc -> Doc

-- | Escape all non-ascii characters using numerical entities.
toEntities :: Text -> Text
fromEntities :: String -> String


-- | Shared utility functions for pandoc writers.
module Text.Pandoc.Writers.Shared

-- | Create JSON value for template from a <a>Meta</a> and an association
--   list of variables, specified at the command line or in the writer.
--   Variables overwrite metadata fields with the same names. If multiple
--   variables are set with the same name, a list is assigned. Does nothing
--   if <a>writerTemplate</a> is Nothing.
metaToJSON :: (Functor m, Monad m, ToJSON a) => WriterOptions -> ([Block] -> m a) -> ([Inline] -> m a) -> Meta -> m Value

-- | Like <a>metaToJSON</a>, but does not include variables and is not
--   sensitive to <a>writerTemplate</a>.
metaToJSON' :: (Functor m, Monad m, ToJSON a) => ([Block] -> m a) -> ([Inline] -> m a) -> Meta -> m Value

-- | Add variables to JSON object, replacing any existing values. Also
--   include <tt>meta-json</tt>, a field containing a string representation
--   of the original JSON object itself, prior to addition of variables.
addVariablesToJSON :: WriterOptions -> Value -> Value

-- | Retrieve a field value from a JSON object.
getField :: FromJSON a => String -> Value -> Maybe a

-- | Set a field of a JSON object. If the field already has a value,
--   convert it into a list with the new value appended to the old
--   value(s). This is a utility function to be used in preparing template
--   contexts.
setField :: ToJSON a => String -> a -> Value -> Value

-- | Reset a field of a JSON object. If the field already has a value, the
--   new value replaces it. This is a utility function to be used in
--   preparing template contexts.
resetField :: ToJSON a => String -> a -> Value -> Value

-- | Set a field of a JSON object if it currently has no value. If it has a
--   value, do nothing. This is a utility function to be used in preparing
--   template contexts.
defField :: ToJSON a => String -> a -> Value -> Value
tagWithAttrs :: String -> Attr -> Doc
fixDisplayMath :: Block -> Block
unsmartify :: WriterOptions -> String -> String
gridTable :: Monad m => WriterOptions -> (WriterOptions -> [Block] -> m Doc) -> Bool -> [Alignment] -> [Double] -> [[Block]] -> [[[Block]]] -> m Doc


-- | Conversion of <a>Pandoc</a> documents to ZimWiki markup.
--   
--   <a>http://zim-wiki.org/manual/Help/Wiki_Syntax.html</a>
module Text.Pandoc.Writers.ZimWiki

-- | Convert Pandoc to ZimWiki.
writeZimWiki :: PandocMonad m => WriterOptions -> Pandoc -> m Text
instance Data.Default.Class.Default Text.Pandoc.Writers.ZimWiki.WriterState


-- | Conversion of <a>Pandoc</a> documents to Textile markup.
--   
--   Textile:
--   <a>http://thresholdstate.com/articles/4312/the-textile-reference-manual</a>
module Text.Pandoc.Writers.Textile

-- | Convert Pandoc to Textile.
writeTextile :: PandocMonad m => WriterOptions -> Pandoc -> m Text


-- | Conversion of <a>Pandoc</a> format into Texinfo.
module Text.Pandoc.Writers.Texinfo

-- | Convert Pandoc to Texinfo.
writeTexinfo :: PandocMonad m => WriterOptions -> Pandoc -> m Text


-- | Conversion of <a>Pandoc</a> documents to Docbook XML.
module Text.Pandoc.Writers.TEI

-- | Convert Pandoc document to string in Docbook format.
writeTEI :: PandocMonad m => WriterOptions -> Pandoc -> m Text


-- | Conversion of <a>Pandoc</a> documents to RTF (rich text format).
module Text.Pandoc.Writers.RTF

-- | Convert Pandoc to a string in rich text format.
writeRTF :: PandocMonad m => WriterOptions -> Pandoc -> m Text


-- | Conversion of <a>Pandoc</a> documents to reStructuredText.
--   
--   reStructuredText: <a>http://docutils.sourceforge.net/rst.html</a>
module Text.Pandoc.Writers.RST

-- | Convert Pandoc to RST.
writeRST :: PandocMonad m => WriterOptions -> Pandoc -> m Text


-- | Conversion of <a>Pandoc</a> documents to powerpoint (pptx).
module Text.Pandoc.Writers.Powerpoint
writePowerpoint :: (PandocMonad m) => WriterOptions -> Pandoc -> m ByteString
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.ContentTypes
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.ContentTypes
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.OverrideContentType
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.OverrideContentType
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.DefaultContentType
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.DefaultContentType
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.Relationship
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.Relationship
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.WriterEnv
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.Presentation
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.Slide
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.Slide
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.SlideElement
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.SlideElement
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.Shape
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.Shape
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.Graphic
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.Graphic
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.Paragraph
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.Paragraph
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.ParaElem
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.ParaElem
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.RunProps
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.RunProps
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.WriterState
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.WriterState
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.Capitals
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.Capitals
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.Strikethrough
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.Strikethrough
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.TeXString
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.TeXString
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.ParaProps
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.ParaProps
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.Algnment
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.Algnment
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.BulletType
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.BulletType
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.HeaderType
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.HeaderType
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.TableProps
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.TableProps
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.PresentationSize
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.PresentationSize
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.PresentationRatio
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.PresentationRatio
instance GHC.Classes.Eq Text.Pandoc.Writers.Powerpoint.MediaInfo
instance GHC.Show.Show Text.Pandoc.Writers.Powerpoint.MediaInfo
instance Data.Default.Class.Default Text.Pandoc.Writers.Powerpoint.WriterEnv
instance Data.Default.Class.Default Text.Pandoc.Writers.Powerpoint.RunProps
instance Data.Default.Class.Default Text.Pandoc.Writers.Powerpoint.WriterState
instance Data.Default.Class.Default Text.Pandoc.Writers.Powerpoint.ParaProps
instance Data.Default.Class.Default Text.Pandoc.Writers.Powerpoint.PresentationSize


-- | Conversion of <a>Pandoc</a> documents to Emacs Org-Mode.
--   
--   Org-Mode: <a>http://orgmode.org</a>
module Text.Pandoc.Writers.Org

-- | Convert Pandoc to Org.
writeOrg :: PandocMonad m => WriterOptions -> Pandoc -> m Text


-- | Conversion of <a>Pandoc</a> documents to Muse.
--   
--   This module is mostly intended for <a>Amusewiki</a> markup support, as
--   described by <a>Text::Amuse markup manual</a>. Original <a>Emacs
--   Muse</a> markup support is a secondary goal.
--   
--   Where Text::Amuse markup <a>differs</a> from <a>Emacs Muse markup</a>,
--   Text::Amuse markup is supported. For example, native tables are always
--   used instead of Org Mode tables. However, <tt>&lt;literal
--   style="html"&gt;</tt> tag is used for HTML raw blocks even though it
--   is supported only in Emacs Muse.
module Text.Pandoc.Writers.Muse

-- | Convert Pandoc to Muse.
writeMuse :: PandocMonad m => WriterOptions -> Pandoc -> m Text


-- | Conversion of <a>Pandoc</a> documents to groff ms format.
--   
--   TODO:
--   
--   <ul>
--   <li><i> </i> use base URL to construct absolute URLs from relative
--   ones for external links</li>
--   <li><i> </i> is there a better way to do strikeout?</li>
--   <li><i> </i> tight/loose list distinction</li>
--   </ul>
module Text.Pandoc.Writers.Ms

-- | Convert Pandoc to Ms.
writeMs :: PandocMonad m => WriterOptions -> Pandoc -> m Text


-- | Conversion of <a>Pandoc</a> documents to groff man page format.
module Text.Pandoc.Writers.Man

-- | Convert Pandoc to Man.
writeMan :: PandocMonad m => WriterOptions -> Pandoc -> m Text


-- | Conversion of <a>Pandoc</a> format into LaTeX.
module Text.Pandoc.Writers.LaTeX

-- | Convert Pandoc to LaTeX.
writeLaTeX :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to LaTeX Beamer.
writeBeamer :: PandocMonad m => WriterOptions -> Pandoc -> m Text
instance GHC.Classes.Eq Text.Pandoc.Writers.LaTeX.StringContext


-- | Conversion of <a>Pandoc</a> documents to haddock markup.
--   
--   Haddock: <a>http://www.haskell.org/haddock/doc/html/</a>
module Text.Pandoc.Writers.Haddock

-- | Convert Pandoc to Haddock.
writeHaddock :: PandocMonad m => WriterOptions -> Pandoc -> m Text
instance Data.Default.Class.Default Text.Pandoc.Writers.Haddock.WriterState


-- | Conversion of <a>Pandoc</a> documents to DokuWiki markup.
--   
--   DokuWiki: <a>https://www.dokuwiki.org/dokuwiki</a>
module Text.Pandoc.Writers.DokuWiki

-- | Convert Pandoc to DokuWiki.
writeDokuWiki :: PandocMonad m => WriterOptions -> Pandoc -> m Text
instance Data.Default.Class.Default Text.Pandoc.Writers.DokuWiki.WriterEnvironment
instance Data.Default.Class.Default Text.Pandoc.Writers.DokuWiki.WriterState


-- | Conversion of <a>Pandoc</a> documents to docx.
module Text.Pandoc.Writers.Docx
writeDocx :: (PandocMonad m) => WriterOptions -> Pandoc -> m ByteString
instance GHC.Classes.Ord Text.Pandoc.Writers.Docx.ListMarker
instance GHC.Classes.Eq Text.Pandoc.Writers.Docx.ListMarker
instance GHC.Read.Read Text.Pandoc.Writers.Docx.ListMarker
instance GHC.Show.Show Text.Pandoc.Writers.Docx.ListMarker


-- | Conversion of <a>Pandoc</a> format into ConTeXt.
module Text.Pandoc.Writers.ConTeXt

-- | Convert Pandoc to ConTeXt.
writeConTeXt :: PandocMonad m => WriterOptions -> Pandoc -> m Text


-- | Conversion of LaTeX documents to PDF.
module Text.Pandoc.PDF
makePDF :: String -> [String] -> (WriterOptions -> Pandoc -> PandocIO Text) -> WriterOptions -> Pandoc -> PandocIO (Either ByteString ByteString)


-- | Conversion of <a>Pandoc</a> documents to OpenDocument XML.
module Text.Pandoc.Writers.OpenDocument

-- | Convert Pandoc document to string in OpenDocument format.
writeOpenDocument :: PandocMonad m => WriterOptions -> Pandoc -> m Text
instance GHC.Classes.Ord Text.Pandoc.Writers.OpenDocument.TextStyle
instance GHC.Classes.Eq Text.Pandoc.Writers.OpenDocument.TextStyle


-- | Conversion of <a>Pandoc</a> documents to ODT.
module Text.Pandoc.Writers.ODT

-- | Produce an ODT file from a Pandoc document.
writeODT :: PandocMonad m => WriterOptions -> Pandoc -> m ByteString


-- | Conversion of <a>Pandoc</a> documents to MediaWiki markup.
--   
--   MediaWiki: <a>http://www.mediawiki.org/wiki/MediaWiki</a>
module Text.Pandoc.Writers.MediaWiki

-- | Convert Pandoc to MediaWiki.
writeMediaWiki :: PandocMonad m => WriterOptions -> Pandoc -> m Text


-- | Conversion of <a>Pandoc</a> documents to JATS XML. Reference:
--   https:/<i>jats.nlm.nih.gov</i>publishing<i>tag-library</i>1.1d3<i>element</i>mml-math.html
module Text.Pandoc.Writers.JATS
writeJATS :: PandocMonad m => WriterOptions -> Pandoc -> m Text
instance GHC.Show.Show Text.Pandoc.Writers.JATS.JATSVersion
instance GHC.Classes.Eq Text.Pandoc.Writers.JATS.JATSVersion


-- | Conversion of <a>Pandoc</a> documents to Adobe InCopy ICML, a
--   stand-alone XML format which is a subset of the zipped IDML format for
--   which the documentation is available here:
--   <a>http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/indesign/sdk/cs6/idml/idml-specification.pdf</a>
--   InCopy is the companion word-processor to Adobe InDesign and ICML
--   documents can be integrated into InDesign with File -&gt; Place.
module Text.Pandoc.Writers.ICML

-- | Convert Pandoc document to string in ICML format.
writeICML :: PandocMonad m => WriterOptions -> Pandoc -> m Text


-- | Conversion of <a>Pandoc</a> documents to HTML.
module Text.Pandoc.Writers.HTML

-- | Convert Pandoc document to Html 4 structure.
writeHtml4 :: PandocMonad m => WriterOptions -> Pandoc -> m Html

-- | Convert Pandoc document to Html 4 string.
writeHtml4String :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc document to Html 5 structure.
writeHtml5 :: PandocMonad m => WriterOptions -> Pandoc -> m Html

-- | Convert Pandoc document to Html 5 string.
writeHtml5String :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc document to Html appropriate for an epub version.
writeHtmlStringForEPUB :: PandocMonad m => EPUBVersion -> WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc document to S5 HTML slide show.
writeS5 :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc document to Slidy HTML slide show.
writeSlidy :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc document to Slideous HTML slide show.
writeSlideous :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc document to DZSlides HTML slide show.
writeDZSlides :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc document to Reveal JS HTML slide show.
writeRevealJs :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Create HTML tag with attributes.
tagWithAttributes :: WriterOptions -> Bool -> Bool -> Text -> Attr -> Text


-- | Conversion of <a>Pandoc</a> documents to EPUB.
module Text.Pandoc.Writers.EPUB

-- | Produce an EPUB2 file from a Pandoc document.
writeEPUB2 :: PandocMonad m => WriterOptions -> Pandoc -> m ByteString

-- | Produce an EPUB3 file from a Pandoc document.
writeEPUB3 :: PandocMonad m => WriterOptions -> Pandoc -> m ByteString
instance GHC.Show.Show Text.Pandoc.Writers.EPUB.EPUBMetadata
instance GHC.Show.Show Text.Pandoc.Writers.EPUB.ProgressionDirection
instance GHC.Show.Show Text.Pandoc.Writers.EPUB.Title
instance GHC.Show.Show Text.Pandoc.Writers.EPUB.Identifier
instance GHC.Show.Show Text.Pandoc.Writers.EPUB.Creator
instance GHC.Show.Show Text.Pandoc.Writers.EPUB.Date


-- | Conversion of <a>Pandoc</a> documents to CommonMark.
--   
--   CommonMark: <a>http://commonmark.org</a>
module Text.Pandoc.Writers.CommonMark

-- | Convert Pandoc to CommonMark.
writeCommonMark :: PandocMonad m => WriterOptions -> Pandoc -> m Text


-- | Conversion of <a>Pandoc</a> documents to Docbook XML.
module Text.Pandoc.Writers.Docbook
writeDocbook4 :: PandocMonad m => WriterOptions -> Pandoc -> m Text
writeDocbook5 :: PandocMonad m => WriterOptions -> Pandoc -> m Text
instance GHC.Show.Show Text.Pandoc.Writers.Docbook.DocBookVersion
instance GHC.Classes.Eq Text.Pandoc.Writers.Docbook.DocBookVersion


-- | A utility library with parsers used in pandoc readers.
module Text.Pandoc.Parsing

-- | Parse characters while a predicate is true.
takeWhileP :: Monad m => (Char -> Bool) -> ParserT [Char] st m [Char]
takeP :: Monad m => Int -> ParserT [Char] st m [Char]

-- | Parse any line of text
anyLine :: Monad m => ParserT [Char] st m [Char]

-- | Parse any line, include the final newline in the output
anyLineNewline :: Monad m => ParserT [Char] st m [Char]

-- | Parse indent by specified number of spaces (or equiv. tabs)
indentWith :: Stream s m Char => HasReaderOptions st => Int -> ParserT s st m [Char]

-- | Like <tt>manyTill</tt>, but reads at least one item.
many1Till :: (Show end, Stream s m t) => ParserT s st m a -> ParserT s st m end -> ParserT s st m [a]

-- | A more general form of <tt>notFollowedBy</tt>. This one allows any
--   type of parser to be specified, and succeeds only if that parser
--   fails. It does not consume any input.
notFollowedBy' :: (Show b, Stream s m a) => ParserT s st m b -> ParserT s st m ()

-- | Parses one of a list of strings. If the list contains two strings one
--   of which is a prefix of the other, the longer string will be matched
--   if possible.
oneOfStrings :: Stream s m Char => [String] -> ParserT s st m String

-- | Parses one of a list of strings (tried in order), case insensitive.
oneOfStringsCI :: Stream s m Char => [String] -> ParserT s st m String

-- | Parses a space or tab.
spaceChar :: Stream s m Char => ParserT s st m Char

-- | Parses a nonspace, nonnewline character.
nonspaceChar :: Stream s m Char => ParserT s st m Char

-- | Skips zero or more spaces or tabs.
skipSpaces :: Stream s m Char => ParserT s st m ()

-- | Skips zero or more spaces or tabs, then reads a newline.
blankline :: Stream s m Char => ParserT s st m Char

-- | Parses one or more blank lines and returns a string of newlines.
blanklines :: Stream s m Char => ParserT s st m [Char]

-- | Gobble n spaces; if tabs are encountered, expand them and gobble some
--   or all of their spaces, leaving the rest.
gobbleSpaces :: (HasReaderOptions st, Monad m) => Int -> ParserT [Char] st m ()

-- | Gobble up to n spaces; if tabs are encountered, expand them and gobble
--   some or all of their spaces, leaving the rest.
gobbleAtMostSpaces :: (HasReaderOptions st, Monad m) => Int -> ParserT [Char] st m Int

-- | Parses material enclosed between start and end parsers.
enclosed :: (Show end, Stream s m Char) => ParserT s st m t -> ParserT s st m end -> ParserT s st m a -> ParserT s st m [a]

-- | Parse string, case insensitive.
stringAnyCase :: Stream s m Char => [Char] -> ParserT s st m String

-- | Parse contents of <tt>str</tt> using <tt>parser</tt> and return
--   result.
parseFromString :: Monad m => ParserT [Char] st m a -> String -> ParserT [Char] st m a

-- | Like <a>parseFromString</a> but specialized for <a>ParserState</a>.
--   This resets <a>stateLastStrPos</a>, which is almost always what we
--   want.
parseFromString' :: Monad m => ParserT String ParserState m a -> String -> ParserT String ParserState m a

-- | Parse raw line block up to and including blank lines.
lineClump :: Monad m => ParserT [Char] st m String

-- | Parse a string of characters between an open character and a close
--   character, including text between balanced pairs of open and close,
--   which must be different. For example, <tt>charsInBalanced '(' ')'
--   anyChar</tt> will parse "(hello (there))" and return "hello (there)".
charsInBalanced :: Stream s m Char => Char -> Char -> ParserT s st m Char -> ParserT s st m String

-- | Parses a roman numeral (uppercase or lowercase), returns number.
romanNumeral :: Stream s m Char => Bool -> ParserT s st m Int

-- | Parses an email address; returns original and corresponding escaped
--   mailto: URI.
emailAddress :: Stream s m Char => ParserT s st m (String, String)

-- | Parses a URI. Returns pair of original and URI-escaped version.
uri :: Monad m => ParserT [Char] st m (String, String)
mathInline :: (HasReaderOptions st, Stream s m Char) => ParserT s st m String
mathDisplay :: (HasReaderOptions st, Stream s m Char) => ParserT s st m String

-- | Applies a parser, returns tuple of its results and its horizontal
--   displacement (the difference between the source column at the end and
--   the source column at the beginning). Vertical displacement (source
--   row) is ignored.
withHorizDisplacement :: Stream s m Char => ParserT s st m a -> ParserT s st m (a, Int)

-- | Applies a parser and returns the raw string that was parsed, along
--   with the value produced by the parser.
withRaw :: Monad m => ParsecT [Char] st m a -> ParsecT [Char] st m (a, [Char])

-- | Parses backslash, then applies character parser.
escaped :: Stream s m Char => ParserT s st m Char -> ParserT s st m Char

-- | Parse character entity.
characterReference :: Stream s m Char => ParserT s st m Char

-- | Parses an ordered list marker and returns list attributes.
anyOrderedListMarker :: Stream s m Char => ParserT s ParserState m ListAttributes

-- | Parses an ordered list marker with a given style and delimiter,
--   returns number.
orderedListMarker :: Stream s m Char => ListNumberStyle -> ListNumberDelim -> ParserT s ParserState m Int

-- | Parses a character reference and returns a Str element.
charRef :: Stream s m Char => ParserT s st m Inline

-- | Parses an RST-style line block and returns a list of strings.
lineBlockLines :: Monad m => ParserT [Char] st m [String]

-- | Parse a table using <tt>headerParser</tt>, <tt>rowParser</tt>,
--   <tt>lineParser</tt>, and <tt>footerParser</tt>.
tableWith :: (Stream s m Char, HasReaderOptions st, Functor mf, Applicative mf, Monad mf) => ParserT s st m (mf [Blocks], [Alignment], [Int]) -> ([Int] -> ParserT s st m (mf [Blocks])) -> ParserT s st m sep -> ParserT s st m end -> ParserT s st m (mf Blocks)
widthsFromIndices :: Int -> [Int] -> [Double]
gridTableWith :: (Monad m, HasReaderOptions st, Functor mf, Applicative mf, Monad mf) => ParserT [Char] st m (mf Blocks) -> Bool -> ParserT [Char] st m (mf Blocks)
gridTableWith' :: (Monad m, HasReaderOptions st, Functor mf, Applicative mf, Monad mf) => ParserT [Char] st m (mf Blocks) -> Bool -> ParserT [Char] st m (TableComponents mf)

-- | Parse a string with a given parser and state
readWith :: Parser [Char] st a -> st -> String -> Either PandocError a

-- | Removes the ParsecT layer from the monad transformer stack
readWithM :: Monad m => ParserT [Char] st m a -> st -> String -> m (Either PandocError a)

-- | Parse a string with <tt>parser</tt> (for testing).
testStringWith :: Show a => ParserT [Char] ParserState Identity a -> [Char] -> IO ()

-- | Succeed only if the extension is enabled.
guardEnabled :: (Stream s m a, HasReaderOptions st) => Extension -> ParserT s st m ()

-- | Succeed only if the extension is disabled.
guardDisabled :: (Stream s m a, HasReaderOptions st) => Extension -> ParserT s st m ()

-- | Update the position on which the last string ended.
updateLastStrPos :: (Stream s m a, HasLastStrPosition st) => ParserT s st m ()

-- | Whether we are right after the end of a string.
notAfterString :: (Stream s m a, HasLastStrPosition st) => ParserT s st m Bool

-- | Add a log message.
logMessage :: (Stream s m a, HasLogMessages st) => LogMessage -> ParserT s st m ()

-- | Report all the accumulated log messages, according to verbosity level.
reportLogMessages :: (PandocMonad m, HasLogMessages st) => ParserT s st m ()

-- | Parsing options.
data ParserState
ParserState :: ReaderOptions -> ParserContext -> QuoteContext -> Bool -> Int -> Maybe SourcePos -> KeyTable -> KeyTable -> SubstTable -> NoteTable -> NoteTable' -> Set String -> Meta -> F Meta -> Map String String -> [HeaderType] -> Map Inlines String -> Set String -> Int -> Map String Int -> Map Text Macro -> String -> Map String (String, Maybe String, Attr) -> Maybe Inlines -> Maybe String -> Int -> [String] -> [LogMessage] -> Bool -> ParserState

-- | User options
[stateOptions] :: ParserState -> ReaderOptions

-- | Inside list?
[stateParserContext] :: ParserState -> ParserContext

-- | Inside quoted environment?
[stateQuoteContext] :: ParserState -> QuoteContext

-- | Allow parsing of links
[stateAllowLinks] :: ParserState -> Bool

-- | Max # of nested Strong/Emph
[stateMaxNestingLevel] :: ParserState -> Int

-- | Position after last str parsed
[stateLastStrPos] :: ParserState -> Maybe SourcePos

-- | List of reference keys
[stateKeys] :: ParserState -> KeyTable

-- | List of implicit header ref keys
[stateHeaderKeys] :: ParserState -> KeyTable

-- | List of substitution references
[stateSubstitutions] :: ParserState -> SubstTable

-- | List of notes (raw bodies)
[stateNotes] :: ParserState -> NoteTable

-- | List of notes (parsed bodies)
[stateNotes'] :: ParserState -> NoteTable'

-- | List of note references used
[stateNoteRefs] :: ParserState -> Set String

-- | Document metadata
[stateMeta] :: ParserState -> Meta

-- | Document metadata
[stateMeta'] :: ParserState -> F Meta

-- | RST-style citations
[stateCitations] :: ParserState -> Map String String

-- | Ordered list of header types used
[stateHeaderTable] :: ParserState -> [HeaderType]

-- | List of headers and ids (used for implicit ref links)
[stateHeaders] :: ParserState -> Map Inlines String

-- | Header identifiers used
[stateIdentifiers] :: ParserState -> Set String

-- | Number of next example
[stateNextExample] :: ParserState -> Int

-- | Map from example labels to numbers
[stateExamples] :: ParserState -> Map String Int

-- | Table of macros defined so far
[stateMacros] :: ParserState -> Map Text Macro

-- | Current rST default interpreted text role
[stateRstDefaultRole] :: ParserState -> String

-- | Current rST custom text roles Triple represents: 1) Base role, 2)
--   Optional format (only for :raw: roles), 3) Additional classes (rest of
--   Attr is unused)).
[stateRstCustomRoles] :: ParserState -> Map String (String, Maybe String, Attr)

-- | Caption in current environment
[stateCaption] :: ParserState -> Maybe Inlines

-- | Tag type of HTML block being parsed
[stateInHtmlBlock] :: ParserState -> Maybe String

-- | Depth of fenced div
[stateFencedDivLevel] :: ParserState -> Int

-- | parent include files
[stateContainers] :: ParserState -> [String]

-- | log messages
[stateLogMessages] :: ParserState -> [LogMessage]

-- | True if in markdown=1 context
[stateMarkdownAttribute] :: ParserState -> Bool
class HasReaderOptions st
extractReaderOptions :: HasReaderOptions st => st -> ReaderOptions
getOption :: (HasReaderOptions st, (Stream s m t)) => (ReaderOptions -> b) -> ParserT s st m b
class HasHeaderMap st
extractHeaderMap :: HasHeaderMap st => st -> Map Inlines String
updateHeaderMap :: HasHeaderMap st => (Map Inlines String -> Map Inlines String) -> st -> st
class HasIdentifierList st
extractIdentifierList :: HasIdentifierList st => st -> Set String
updateIdentifierList :: HasIdentifierList st => (Set String -> Set String) -> st -> st
class HasMacros st
extractMacros :: HasMacros st => st -> Map Text Macro
updateMacros :: HasMacros st => (Map Text Macro -> Map Text Macro) -> st -> st
class HasLogMessages st
addLogMessage :: HasLogMessages st => LogMessage -> st -> st
getLogMessages :: HasLogMessages st => st -> [LogMessage]
class HasLastStrPosition st
setLastStrPos :: HasLastStrPosition st => SourcePos -> st -> st
getLastStrPos :: HasLastStrPosition st => st -> Maybe SourcePos
class HasIncludeFiles st
getIncludeFiles :: HasIncludeFiles st => st -> [String]
addIncludeFile :: HasIncludeFiles st => String -> st -> st
dropLatestIncludeFile :: HasIncludeFiles st => st -> st
defaultParserState :: ParserState
data HeaderType

-- | Single line of characters underneath
SingleHeader :: Char -> HeaderType

-- | Lines of characters above and below
DoubleHeader :: Char -> HeaderType
data ParserContext

-- | Used when running parser on list item contents
ListItemState :: ParserContext

-- | Default state
NullState :: ParserContext
data QuoteContext

-- | Used when parsing inside single quotes
InSingleQuote :: QuoteContext

-- | Used when parsing inside double quotes
InDoubleQuote :: QuoteContext

-- | Used when not parsing inside quotes
NoQuote :: QuoteContext
class HasQuoteContext st m
getQuoteContext :: (HasQuoteContext st m, (Stream s m t)) => ParsecT s st m QuoteContext
withQuoteContext :: HasQuoteContext st m => QuoteContext -> ParsecT s st m a -> ParsecT s st m a
type NoteTable = [(String, String)]
type NoteTable' = Map String (SourcePos, F Blocks)
type KeyTable = Map Key (Target, Attr)
type SubstTable = Map Key Inlines
newtype Key
Key :: String -> Key
toKey :: String -> Key
registerHeader :: (Stream s m a, HasReaderOptions st, HasHeaderMap st, HasLogMessages st, HasIdentifierList st) => Attr -> Inlines -> ParserT s st m Attr
smartPunctuation :: (HasReaderOptions st, HasLastStrPosition st, HasQuoteContext st m, Stream s m Char) => ParserT s st m Inlines -> ParserT s st m Inlines
singleQuoteStart :: (HasLastStrPosition st, HasQuoteContext st m, Stream s m Char) => ParserT s st m ()
singleQuoteEnd :: Stream s m Char => ParserT s st m ()
doubleQuoteStart :: (HasQuoteContext st m, Stream s m Char) => ParserT s st m ()
doubleQuoteEnd :: Stream s m Char => ParserT s st m ()
ellipses :: Stream s m Char => ParserT s st m Inlines
apostrophe :: Stream s m Char => ParserT s st m Inlines
dash :: (HasReaderOptions st, Stream s m Char) => ParserT s st m Inlines
nested :: Stream s m a => ParserT s ParserState m a -> ParserT s ParserState m a
citeKey :: (Stream s m Char, HasLastStrPosition st) => ParserT s st m (Bool, String)
type Parser t s = Parsec t s
type ParserT = ParsecT
type F = Future ParserState

-- | Reader monad wrapping the parser state. This is used to possibly delay
--   evaluation until all relevant information has been parsed and made
--   available in the parser state.
newtype Future s a
Future :: Reader s a -> Future s a
[runDelayed] :: Future s a -> Reader s a
runF :: Future s a -> s -> a
askF :: Future s s
asksF :: (s -> a) -> Future s a
returnF :: Monad m => a -> m (Future s a)
trimInlinesF :: Future s Inlines -> Future s Inlines
token :: (Stream s m t) => (t -> String) -> (t -> SourcePos) -> (t -> Maybe a) -> ParsecT s st m a
(<+?>) :: (Monoid a) => ParserT s st m a -> ParserT s st m a -> ParserT s st m a
infixr 5 <+?>
extractIdClass :: Attr -> Attr

-- | Parse content of include file as blocks. Circular includes result in
--   an <tt>PandocParseError</tt>.
insertIncludedFile :: (PandocMonad m, HasIncludeFiles st) => ParserT [a] st m Blocks -> (String -> [a]) -> [FilePath] -> FilePath -> ParserT [a] st m Blocks

-- | Parse content of include file as future blocks. Circular includes
--   result in an <tt>PandocParseError</tt>.
insertIncludedFileF :: (PandocMonad m, HasIncludeFiles st) => ParserT String st m (Future st Blocks) -> [FilePath] -> FilePath -> ParserT String st m (Future st Blocks)

-- | An instance of <tt>Stream</tt> has stream type <tt>s</tt>, underlying
--   monad <tt>m</tt> and token type <tt>t</tt> determined by the stream
--   
--   Some rough guidelines for a "correct" instance of Stream:
--   
--   <ul>
--   <li>unfoldM uncons gives the [t] corresponding to the stream</li>
--   <li>A <tt>Stream</tt> instance is responsible for maintaining the
--   "position within the stream" in the stream state <tt>s</tt>. This is
--   trivial unless you are using the monad in a non-trivial way.</li>
--   </ul>
class Monad m => Stream s (m :: * -> *) t | s -> t

-- | The most general way to run a parser over the Identity monad.
--   <tt>runParser p state filePath input</tt> runs parser <tt>p</tt> on
--   the input list of tokens <tt>input</tt>, obtained from source
--   <tt>filePath</tt> with the initial user state <tt>st</tt>. The
--   <tt>filePath</tt> is only used in error messages and may be the empty
--   string. Returns either a <a>ParseError</a> (<a>Left</a>) or a value of
--   type <tt>a</tt> (<a>Right</a>).
--   
--   <pre>
--   parseFromFile p fname
--     = do{ input &lt;- readFile fname
--         ; return (runParser p () fname input)
--         }
--   </pre>
runParser :: Stream s Identity t => Parsec s u a -> u -> SourceName -> s -> Either ParseError a

-- | The most general way to run a parser. <tt>runParserT p state filePath
--   input</tt> runs parser <tt>p</tt> on the input list of tokens
--   <tt>input</tt>, obtained from source <tt>filePath</tt> with the
--   initial user state <tt>st</tt>. The <tt>filePath</tt> is only used in
--   error messages and may be the empty string. Returns a computation in
--   the underlying monad <tt>m</tt> that return either a <a>ParseError</a>
--   (<a>Left</a>) or a value of type <tt>a</tt> (<a>Right</a>).
runParserT :: Stream s m t => ParsecT s u m a -> u -> SourceName -> s -> m Either ParseError a

-- | <tt>parse p filePath input</tt> runs a parser <tt>p</tt> over Identity
--   without user state. The <tt>filePath</tt> is only used in error
--   messages and may be the empty string. Returns either a
--   <a>ParseError</a> (<a>Left</a>) or a value of type <tt>a</tt>
--   (<a>Right</a>).
--   
--   <pre>
--   main    = case (parse numbers "" "11, 2, 43") of
--              Left err  -&gt; print err
--              Right xs  -&gt; print (sum xs)
--   
--   numbers = commaSep integer
--   </pre>
parse :: Stream s Identity t => Parsec s () a -> SourceName -> s -> Either ParseError a

-- | The parser <tt>tokenPrim showTok nextPos testTok</tt> accepts a token
--   <tt>t</tt> with result <tt>x</tt> when the function <tt>testTok t</tt>
--   returns <tt><a>Just</a> x</tt>. The token can be shown using
--   <tt>showTok t</tt>. The position of the <i>next</i> token should be
--   returned when <tt>nextPos</tt> is called with the current source
--   position <tt>pos</tt>, the current token <tt>t</tt> and the rest of
--   the tokens <tt>toks</tt>, <tt>nextPos pos t toks</tt>.
--   
--   This is the most primitive combinator for accepting tokens. For
--   example, the <a>char</a> parser could be implemented as:
--   
--   <pre>
--   char c
--     = tokenPrim showChar nextPos testChar
--     where
--       showChar x        = "'" ++ x ++ "'"
--       testChar x        = if x == c then Just x else Nothing
--       nextPos pos x xs  = updatePosChar pos x
--   </pre>
tokenPrim :: Stream s m t => (t -> String) -> (SourcePos -> t -> s -> SourcePos) -> (t -> Maybe a) -> ParsecT s u m a

-- | The parser <tt>anyToken</tt> accepts any kind of token. It is for
--   example used to implement <a>eof</a>. Returns the accepted token.
anyToken :: (Stream s m t, Show t) => ParsecT s u m t

-- | Returns the current input
getInput :: Monad m => ParsecT s u m s

-- | <tt>setInput input</tt> continues parsing with <tt>input</tt>. The
--   <a>getInput</a> and <tt>setInput</tt> functions can for example be
--   used to deal with #include files.
setInput :: Monad m => s -> ParsecT s u m ()

-- | The parser <tt>unexpected msg</tt> always fails with an unexpected
--   error message <tt>msg</tt> without consuming any input.
--   
--   The parsers <a>fail</a>, (<a>&lt;?&gt;</a>) and <tt>unexpected</tt>
--   are the three parsers used to generate error messages. Of these, only
--   (<a>&lt;?&gt;</a>) is commonly used. For an example of the use of
--   <tt>unexpected</tt>, see the definition of <a>notFollowedBy</a>.
unexpected :: Stream s m t => String -> ParsecT s u m a

-- | <tt>char c</tt> parses a single character <tt>c</tt>. Returns the
--   parsed character (i.e. <tt>c</tt>).
--   
--   <pre>
--   semiColon  = char ';'
--   </pre>
char :: Stream s m Char => Char -> ParsecT s u m Char

-- | Parses a letter (an upper case or lower case character). Returns the
--   parsed character.
letter :: Stream s m Char => ParsecT s u m Char

-- | Parses a digit. Returns the parsed character.
digit :: Stream s m Char => ParsecT s u m Char

-- | Parses a letter or digit (a character between '0' and '9'). Returns
--   the parsed character.
alphaNum :: Stream s m Char => ParsecT s u m Char

-- | <tt>skipMany p</tt> applies the parser <tt>p</tt> <i>zero</i> or more
--   times, skipping its result.
--   
--   <pre>
--   spaces  = skipMany space
--   </pre>
skipMany :: () => ParsecT s u m a -> ParsecT s u m ()

-- | <tt>skipMany1 p</tt> applies the parser <tt>p</tt> <i>one</i> or more
--   times, skipping its result.
skipMany1 :: Stream s m t => ParsecT s u m a -> ParsecT s u m ()

-- | Skips <i>zero</i> or more white space characters. See also
--   <a>skipMany</a>.
spaces :: Stream s m Char => ParsecT s u m ()

-- | Parses a white space character (any character which satisfies
--   <a>isSpace</a>) Returns the parsed character.
space :: Stream s m Char => ParsecT s u m Char

-- | This parser succeeds for any character. Returns the parsed character.
anyChar :: Stream s m Char => ParsecT s u m Char

-- | The parser <tt>satisfy f</tt> succeeds for any character for which the
--   supplied function <tt>f</tt> returns <a>True</a>. Returns the
--   character that is actually parsed.
satisfy :: Stream s m Char => (Char -> Bool) -> ParsecT s u m Char

-- | Parses a newline character ('\n'). Returns a newline character.
newline :: Stream s m Char => ParsecT s u m Char

-- | <tt>string s</tt> parses a sequence of characters given by <tt>s</tt>.
--   Returns the parsed string (i.e. <tt>s</tt>).
--   
--   <pre>
--   divOrMod    =   string "div" 
--               &lt;|&gt; string "mod"
--   </pre>
string :: Stream s m Char => String -> ParsecT s u m String

-- | <tt>count n p</tt> parses <tt>n</tt> occurrences of <tt>p</tt>. If
--   <tt>n</tt> is smaller or equal to zero, the parser equals to
--   <tt>return []</tt>. Returns a list of <tt>n</tt> values returned by
--   <tt>p</tt>.
count :: Stream s m t => Int -> ParsecT s u m a -> ParsecT s u m [a]

-- | This parser only succeeds at the end of the input. This is not a
--   primitive parser but it is defined using <a>notFollowedBy</a>.
--   
--   <pre>
--   eof  = notFollowedBy anyToken &lt;?&gt; "end of input"
--   </pre>
eof :: (Stream s m t, Show t) => ParsecT s u m ()

-- | As the dual of <a>oneOf</a>, <tt>noneOf cs</tt> succeeds if the
--   current character <i>not</i> in the supplied list of characters
--   <tt>cs</tt>. Returns the parsed character.
--   
--   <pre>
--   consonant = noneOf "aeiou"
--   </pre>
noneOf :: Stream s m Char => [Char] -> ParsecT s u m Char

-- | <tt>oneOf cs</tt> succeeds if the current character is in the supplied
--   list of characters <tt>cs</tt>. Returns the parsed character. See also
--   <a>satisfy</a>.
--   
--   <pre>
--   vowel  = oneOf "aeiou"
--   </pre>
oneOf :: Stream s m Char => [Char] -> ParsecT s u m Char

-- | <tt>lookAhead p</tt> parses <tt>p</tt> without consuming any input.
--   
--   If <tt>p</tt> fails and consumes some input, so does
--   <tt>lookAhead</tt>. Combine with <a>try</a> if this is undesirable.
lookAhead :: Stream s m t => ParsecT s u m a -> ParsecT s u m a

-- | <tt>notFollowedBy p</tt> only succeeds when parser <tt>p</tt> fails.
--   This parser does not consume any input. This parser can be used to
--   implement the 'longest match' rule. For example, when recognizing
--   keywords (for example <tt>let</tt>), we want to make sure that a
--   keyword is not followed by a legal identifier character, in which case
--   the keyword is actually an identifier (for example <tt>lets</tt>). We
--   can program this behaviour as follows:
--   
--   <pre>
--   keywordLet  = try (do{ string "let"
--                        ; notFollowedBy alphaNum
--                        })
--   </pre>
notFollowedBy :: (Stream s m t, Show a) => ParsecT s u m a -> ParsecT s u m ()

-- | <tt>many p</tt> applies the parser <tt>p</tt> <i>zero</i> or more
--   times. Returns a list of the returned values of <tt>p</tt>.
--   
--   <pre>
--   identifier  = do{ c  &lt;- letter
--                   ; cs &lt;- many (alphaNum &lt;|&gt; char '_')
--                   ; return (c:cs)
--                   }
--   </pre>
many :: () => ParsecT s u m a -> ParsecT s u m [a]

-- | <tt>many1 p</tt> applies the parser <tt>p</tt> <i>one</i> or more
--   times. Returns a list of the returned values of <tt>p</tt>.
--   
--   <pre>
--   word  = many1 letter
--   </pre>
many1 :: Stream s m t => ParsecT s u m a -> ParsecT s u m [a]

-- | <tt>manyTill p end</tt> applies parser <tt>p</tt> <i>zero</i> or more
--   times until parser <tt>end</tt> succeeds. Returns the list of values
--   returned by <tt>p</tt>. This parser can be used to scan comments:
--   
--   <pre>
--   simpleComment   = do{ string "&lt;!--"
--                       ; manyTill anyChar (try (string "--&gt;"))
--                       }
--   </pre>
--   
--   Note the overlapping parsers <tt>anyChar</tt> and <tt>string
--   "--&gt;"</tt>, and therefore the use of the <a>try</a> combinator.
manyTill :: Stream s m t => ParsecT s u m a -> ParsecT s u m end -> ParsecT s u m [a]

-- | This combinator implements choice. The parser <tt>p &lt;|&gt; q</tt>
--   first applies <tt>p</tt>. If it succeeds, the value of <tt>p</tt> is
--   returned. If <tt>p</tt> fails <i>without consuming any input</i>,
--   parser <tt>q</tt> is tried. This combinator is defined equal to the
--   <a>mplus</a> member of the <a>MonadPlus</a> class and the
--   (<a>&lt;|&gt;</a>) member of <a>Alternative</a>.
--   
--   The parser is called <i>predictive</i> since <tt>q</tt> is only tried
--   when parser <tt>p</tt> didn't consume any input (i.e.. the look ahead
--   is 1). This non-backtracking behaviour allows for both an efficient
--   implementation of the parser combinators and the generation of good
--   error messages.
(<|>) :: () => ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a
infixr 1 <|>

-- | The parser <tt>p &lt;?&gt; msg</tt> behaves as parser <tt>p</tt>, but
--   whenever the parser <tt>p</tt> fails <i>without consuming any
--   input</i>, it replaces expect error messages with the expect error
--   message <tt>msg</tt>.
--   
--   This is normally used at the end of a set alternatives where we want
--   to return an error message in terms of a higher level construct rather
--   than returning all possible characters. For example, if the
--   <tt>expr</tt> parser from the <a>try</a> example would fail, the error
--   message is: '...: expecting expression'. Without the
--   <tt>(&lt;?&gt;)</tt> combinator, the message would be like '...:
--   expecting "let" or letter', which is less friendly.
(<?>) :: () => ParsecT s u m a -> String -> ParsecT s u m a
infix 0 <?>

-- | <tt>choice ps</tt> tries to apply the parsers in the list <tt>ps</tt>
--   in order, until one of them succeeds. Returns the value of the
--   succeeding parser.
choice :: Stream s m t => [ParsecT s u m a] -> ParsecT s u m a

-- | The parser <tt>try p</tt> behaves like parser <tt>p</tt>, except that
--   it pretends that it hasn't consumed any input when an error occurs.
--   
--   This combinator is used whenever arbitrary look ahead is needed. Since
--   it pretends that it hasn't consumed any input when <tt>p</tt> fails,
--   the (<a>&lt;|&gt;</a>) combinator will try its second alternative even
--   when the first parser failed while consuming input.
--   
--   The <tt>try</tt> combinator can for example be used to distinguish
--   identifiers and reserved words. Both reserved words and identifiers
--   are a sequence of letters. Whenever we expect a certain reserved word
--   where we can also expect an identifier we have to use the <tt>try</tt>
--   combinator. Suppose we write:
--   
--   <pre>
--   expr        = letExpr &lt;|&gt; identifier &lt;?&gt; "expression"
--   
--   letExpr     = do{ string "let"; ... }
--   identifier  = many1 letter
--   </pre>
--   
--   If the user writes "lexical", the parser fails with: <tt>unexpected
--   'x', expecting 't' in "let"</tt>. Indeed, since the (<a>&lt;|&gt;</a>)
--   combinator only tries alternatives when the first alternative hasn't
--   consumed input, the <tt>identifier</tt> parser is never tried (because
--   the prefix "le" of the <tt>string "let"</tt> parser is already
--   consumed). The right behaviour can be obtained by adding the
--   <tt>try</tt> combinator:
--   
--   <pre>
--   expr        = letExpr &lt;|&gt; identifier &lt;?&gt; "expression"
--   
--   letExpr     = do{ try (string "let"); ... }
--   identifier  = many1 letter
--   </pre>
try :: () => ParsecT s u m a -> ParsecT s u m a

-- | <tt>sepBy p sep</tt> parses <i>zero</i> or more occurrences of
--   <tt>p</tt>, separated by <tt>sep</tt>. Returns a list of values
--   returned by <tt>p</tt>.
--   
--   <pre>
--   commaSep p  = p `sepBy` (symbol ",")
--   </pre>
sepBy :: Stream s m t => ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m [a]

-- | <tt>sepBy1 p sep</tt> parses <i>one</i> or more occurrences of
--   <tt>p</tt>, separated by <tt>sep</tt>. Returns a list of values
--   returned by <tt>p</tt>.
sepBy1 :: Stream s m t => ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m [a]

-- | <tt>sepEndBy p sep</tt> parses <i>zero</i> or more occurrences of
--   <tt>p</tt>, separated and optionally ended by <tt>sep</tt>, ie.
--   haskell style statements. Returns a list of values returned by
--   <tt>p</tt>.
--   
--   <pre>
--   haskellStatements  = haskellStatement `sepEndBy` semi
--   </pre>
sepEndBy :: Stream s m t => ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m [a]

-- | <tt>sepEndBy1 p sep</tt> parses <i>one</i> or more occurrences of
--   <tt>p</tt>, separated and optionally ended by <tt>sep</tt>. Returns a
--   list of values returned by <tt>p</tt>.
sepEndBy1 :: Stream s m t => ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m [a]

-- | <tt>endBy p sep</tt> parses <i>zero</i> or more occurrences of
--   <tt>p</tt>, separated and ended by <tt>sep</tt>. Returns a list of
--   values returned by <tt>p</tt>.
--   
--   <pre>
--   cStatements  = cStatement `endBy` semi
--   </pre>
endBy :: Stream s m t => ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m [a]

-- | <tt>endBy1 p sep</tt> parses <i>one</i> or more occurrences of
--   <tt>p</tt>, separated and ended by <tt>sep</tt>. Returns a list of
--   values returned by <tt>p</tt>.
endBy1 :: Stream s m t => ParsecT s u m a -> ParsecT s u m sep -> ParsecT s u m [a]

-- | <tt>option x p</tt> tries to apply parser <tt>p</tt>. If <tt>p</tt>
--   fails without consuming input, it returns the value <tt>x</tt>,
--   otherwise the value returned by <tt>p</tt>.
--   
--   <pre>
--   priority  = option 0 (do{ d &lt;- digit
--                           ; return (digitToInt d) 
--                           })
--   </pre>
option :: Stream s m t => a -> ParsecT s u m a -> ParsecT s u m a

-- | <tt>optional p</tt> tries to apply parser <tt>p</tt>. It will parse
--   <tt>p</tt> or nothing. It only fails if <tt>p</tt> fails after
--   consuming input. It discards the result of <tt>p</tt>.
optional :: Stream s m t => ParsecT s u m a -> ParsecT s u m ()

-- | <tt>optionMaybe p</tt> tries to apply parser <tt>p</tt>. If <tt>p</tt>
--   fails without consuming input, it return <a>Nothing</a>, otherwise it
--   returns <a>Just</a> the value returned by <tt>p</tt>.
optionMaybe :: Stream s m t => ParsecT s u m a -> ParsecT s u m Maybe a

-- | Returns the current user state.
getState :: Monad m => ParsecT s u m u

-- | An alias for putState for backwards compatibility.
setState :: Monad m => u -> ParsecT s u m ()

-- | An alias for modifyState for backwards compatibility.
updateState :: Monad m => (u -> u) -> ParsecT s u m ()

-- | The abstract data type <tt>SourcePos</tt> represents source positions.
--   It contains the name of the source (i.e. file name), a line number and
--   a column number. <tt>SourcePos</tt> is an instance of the <a>Show</a>,
--   <a>Eq</a> and <a>Ord</a> class.
data SourcePos :: *

-- | Returns the current source position. See also <a>SourcePos</a>.
getPosition :: Monad m => ParsecT s u m SourcePos

-- | <tt>setPosition pos</tt> sets the current source position to
--   <tt>pos</tt>.
setPosition :: Monad m => SourcePos -> ParsecT s u m ()

-- | Extracts the column number from a source position.
sourceColumn :: SourcePos -> Column

-- | Extracts the line number from a source position.
sourceLine :: SourcePos -> Line

-- | Set the column number of a source position.
setSourceColumn :: SourcePos -> Column -> SourcePos

-- | Set the line number of a source position.
setSourceLine :: SourcePos -> Line -> SourcePos

-- | Create a new <a>SourcePos</a> with the given source name, line number
--   and column number.
newPos :: SourceName -> Line -> Column -> SourcePos
type Line = Int
type Column = Int
instance GHC.Classes.Ord Text.Pandoc.Parsing.Key
instance GHC.Classes.Eq Text.Pandoc.Parsing.Key
instance GHC.Read.Read Text.Pandoc.Parsing.Key
instance GHC.Show.Show Text.Pandoc.Parsing.Key
instance GHC.Show.Show Text.Pandoc.Parsing.QuoteContext
instance GHC.Classes.Eq Text.Pandoc.Parsing.QuoteContext
instance GHC.Show.Show Text.Pandoc.Parsing.ParserContext
instance GHC.Classes.Eq Text.Pandoc.Parsing.ParserContext
instance GHC.Show.Show Text.Pandoc.Parsing.HeaderType
instance GHC.Classes.Eq Text.Pandoc.Parsing.HeaderType
instance GHC.Base.Functor (Text.Pandoc.Parsing.Future s)
instance GHC.Base.Applicative (Text.Pandoc.Parsing.Future s)
instance GHC.Base.Monad (Text.Pandoc.Parsing.Future s)
instance Data.Default.Class.Default Text.Pandoc.Parsing.ParserState
instance Text.Pandoc.Builder.HasMeta Text.Pandoc.Parsing.ParserState
instance Text.Pandoc.Parsing.HasReaderOptions Text.Pandoc.Parsing.ParserState
instance GHC.Base.Monad m => Text.Pandoc.Parsing.HasQuoteContext Text.Pandoc.Parsing.ParserState m
instance Text.Pandoc.Parsing.HasHeaderMap Text.Pandoc.Parsing.ParserState
instance Text.Pandoc.Parsing.HasIdentifierList Text.Pandoc.Parsing.ParserState
instance Text.Pandoc.Parsing.HasMacros Text.Pandoc.Parsing.ParserState
instance Text.Pandoc.Parsing.HasLastStrPosition Text.Pandoc.Parsing.ParserState
instance Text.Pandoc.Parsing.HasLogMessages Text.Pandoc.Parsing.ParserState
instance Text.Pandoc.Parsing.HasIncludeFiles Text.Pandoc.Parsing.ParserState
instance GHC.Base.Monoid a => GHC.Base.Monoid (Text.Pandoc.Parsing.Future s a)


-- | Conversion of <a>Pandoc</a> documents to markdown-formatted plain
--   text.
--   
--   Markdown: <a>http://daringfireball.net/projects/markdown/</a>
module Text.Pandoc.Writers.Markdown

-- | Convert Pandoc to Markdown.
writeMarkdown :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to plain text (like markdown, but without links,
--   pictures, or inline formatting).
writePlain :: PandocMonad m => WriterOptions -> Pandoc -> m Text
instance Data.Default.Class.Default Text.Pandoc.Writers.Markdown.WriterState
instance Data.Default.Class.Default Text.Pandoc.Writers.Markdown.WriterEnv


-- | Conversion of <a>Pandoc</a> documents to OPML XML.
module Text.Pandoc.Writers.OPML

-- | Convert Pandoc document to string in OPML format.
writeOPML :: PandocMonad m => WriterOptions -> Pandoc -> m Text


-- | Conversion of <a>Pandoc</a> documents to asciidoc.
--   
--   Note that some information may be lost in conversion, due to
--   expressive limitations of asciidoc. Footnotes and table cells with
--   paragraphs (or other block items) are not possible in asciidoc. If
--   pandoc encounters one of these, it will insert a message indicating
--   that it has omitted the construct.
--   
--   AsciiDoc: <a>http://www.methods.co.nz/asciidoc/</a>
module Text.Pandoc.Writers.AsciiDoc

-- | Convert Pandoc to AsciiDoc.
writeAsciiDoc :: PandocMonad m => WriterOptions -> Pandoc -> m Text


-- | Conversion of vimwiki text to <a>Pandoc</a> document.
module Text.Pandoc.Readers.Vimwiki
readVimwiki :: PandocMonad m => ReaderOptions -> Text -> m Pandoc


-- | Conversion of txt2tags formatted plain text to <a>Pandoc</a> document.
module Text.Pandoc.Readers.Txt2Tags

-- | Read Txt2Tags from an input string returning a Pandoc document
readTxt2Tags :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

-- | Get the meta information required by Txt2Tags macros
getT2TMeta :: PandocMonad m => m T2TMeta

-- | An object for the T2T macros meta information the contents of each
--   field is simply substituted verbatim into the file
data T2TMeta
T2TMeta :: String -> String -> FilePath -> FilePath -> T2TMeta

-- | Current date
[date] :: T2TMeta -> String

-- | Last modification time of infile
[mtime] :: T2TMeta -> String

-- | Input file
[infile] :: T2TMeta -> FilePath

-- | Output file
[outfile] :: T2TMeta -> FilePath
instance GHC.Show.Show Text.Pandoc.Readers.Txt2Tags.T2TMeta
instance Data.Default.Class.Default Text.Pandoc.Readers.Txt2Tags.T2TMeta


-- | Conversion of TikiWiki text to <a>Pandoc</a> document.
module Text.Pandoc.Readers.TikiWiki

-- | Read TikiWiki from an input string and return a Pandoc document.
readTikiWiki :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
instance GHC.Show.Show Text.Pandoc.Readers.TikiWiki.ListNesting
instance GHC.Classes.Eq Text.Pandoc.Readers.TikiWiki.ListNesting
instance GHC.Classes.Ord Text.Pandoc.Readers.TikiWiki.ListNesting
instance GHC.Show.Show Text.Pandoc.Readers.TikiWiki.ListType
instance GHC.Classes.Eq Text.Pandoc.Readers.TikiWiki.ListType
instance GHC.Classes.Ord Text.Pandoc.Readers.TikiWiki.ListType


-- | Conversion from reStructuredText to <a>Pandoc</a> document.
module Text.Pandoc.Readers.RST

-- | Parse reStructuredText string and return Pandoc document.
readRST :: PandocMonad m => ReaderOptions -> Text -> m Pandoc


-- | Conversion of LaTeX to <a>Pandoc</a> document.
module Text.Pandoc.Readers.LaTeX

-- | Parse LaTeX from string and return <a>Pandoc</a> document.
readLaTeX :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
applyMacros :: (PandocMonad m, HasMacros s, HasReaderOptions s) => String -> ParserT String s m String
rawLaTeXInline :: (PandocMonad m, HasMacros s, HasReaderOptions s) => ParserT String s m String
rawLaTeXBlock :: (PandocMonad m, HasMacros s, HasReaderOptions s) => ParserT String s m String
inlineCommand :: PandocMonad m => ParserT String ParserState m Inlines
tokenize :: SourceName -> Text -> [Tok]
untokenize :: [Tok] -> Text
instance GHC.Show.Show Text.Pandoc.Readers.LaTeX.LaTeXState
instance GHC.Show.Show Text.Pandoc.Readers.LaTeX.HeaderNum
instance Text.Pandoc.Class.PandocMonad m => Text.Pandoc.Parsing.HasQuoteContext Text.Pandoc.Readers.LaTeX.LaTeXState m
instance Text.Pandoc.Parsing.HasLogMessages Text.Pandoc.Readers.LaTeX.LaTeXState
instance Text.Pandoc.Parsing.HasIdentifierList Text.Pandoc.Readers.LaTeX.LaTeXState
instance Text.Pandoc.Parsing.HasIncludeFiles Text.Pandoc.Readers.LaTeX.LaTeXState
instance Text.Pandoc.Parsing.HasHeaderMap Text.Pandoc.Readers.LaTeX.LaTeXState
instance Text.Pandoc.Parsing.HasMacros Text.Pandoc.Readers.LaTeX.LaTeXState
instance Text.Pandoc.Parsing.HasReaderOptions Text.Pandoc.Readers.LaTeX.LaTeXState
instance Text.Pandoc.Builder.HasMeta Text.Pandoc.Readers.LaTeX.LaTeXState
instance Data.Default.Class.Default Text.Pandoc.Readers.LaTeX.LaTeXState


-- | Conversion of org-mode formatted plain text to <a>Pandoc</a> document.
module Text.Pandoc.Readers.Org

-- | Parse org-mode string and return a Pandoc document.
readOrg :: PandocMonad m => ReaderOptions -> Text -> m Pandoc


-- | Conversion of HTML to <a>Pandoc</a> document.
module Text.Pandoc.Readers.HTML

-- | Convert HTML-formatted string to <a>Pandoc</a> document.
readHtml :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

-- | Matches a tag meeting a certain condition.
htmlTag :: (HasReaderOptions st, Monad m) => (Tag String -> Bool) -> ParserT [Char] st m (Tag String, String)

-- | Matches a stretch of HTML in balanced tags.
htmlInBalanced :: (HasReaderOptions st, Monad m) => (Tag String -> Bool) -> ParserT String st m String
isInlineTag :: NamedTag (Tag a) => Tag a -> Bool
isBlockTag :: NamedTag (Tag a) => Tag a -> Bool
class NamedTag a
getTagName :: NamedTag a => a -> Maybe Text
isTextTag :: Tag a -> Bool
isCommentTag :: Tag a -> Bool
instance Text.Pandoc.Readers.HTML.NamedTag (Text.HTML.TagSoup.Type.Tag Data.Text.Internal.Text)
instance Text.Pandoc.Readers.HTML.NamedTag (Text.HTML.TagSoup.Type.Tag GHC.Base.String)
instance Text.Pandoc.Class.PandocMonad m => Text.Pandoc.Parsing.HasQuoteContext Text.Pandoc.Readers.HTML.HTMLState (Control.Monad.Trans.Reader.ReaderT Text.Pandoc.Readers.HTML.HTMLLocal m)
instance Data.Default.Class.Default Text.Pandoc.Readers.HTML.HTMLLocal
instance Text.Pandoc.Parsing.HasIdentifierList Text.Pandoc.Readers.HTML.HTMLState
instance Text.Pandoc.Parsing.HasHeaderMap Text.Pandoc.Readers.HTML.HTMLState
instance Text.Pandoc.Parsing.HasLogMessages Text.Pandoc.Readers.HTML.HTMLState
instance Text.Pandoc.Parsing.HasReaderOptions Text.Pandoc.Readers.HTML.HTMLState
instance Text.Pandoc.Builder.HasMeta Text.Pandoc.Readers.HTML.HTMLState
instance Text.Pandoc.Parsing.HasLastStrPosition Text.Pandoc.Readers.HTML.HTMLState


-- | Conversion from Textile to <a>Pandoc</a> document, based on the spec
--   available at <a>http://redcloth.org/textile</a>.
--   
--   Implemented and parsed: - Paragraphs - Code blocks - Lists -
--   blockquote - Inlines : strong, emph, cite, code, deleted, superscript,
--   subscript, links - footnotes - HTML-specific and CSS-specific
--   attributes on headers
--   
--   Left to be implemented: - dimension sign - all caps - continued blocks
--   (ex bq..)
--   
--   TODO : refactor common patterns across readers : - more ...
module Text.Pandoc.Readers.Textile

-- | Parse a Textile text and return a Pandoc document.
readTextile :: PandocMonad m => ReaderOptions -> Text -> m Pandoc


-- | Conversion of twiki text to <a>Pandoc</a> document.
module Text.Pandoc.Readers.TWiki

-- | Read twiki from an input string and return a Pandoc document.
readTWiki :: PandocMonad m => ReaderOptions -> Text -> m Pandoc


-- | Conversion of Muse text to <a>Pandoc</a> document.
module Text.Pandoc.Readers.Muse

-- | Read Muse from an input string and return a Pandoc document.
readMuse :: PandocMonad m => ReaderOptions -> Text -> m Pandoc


-- | Conversion of mediawiki text to <a>Pandoc</a> document.
module Text.Pandoc.Readers.MediaWiki

-- | Read mediawiki from an input string and return a Pandoc document.
readMediaWiki :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
instance Text.Pandoc.Parsing.HasReaderOptions Text.Pandoc.Readers.MediaWiki.MWState
instance Text.Pandoc.Parsing.HasHeaderMap Text.Pandoc.Readers.MediaWiki.MWState
instance Text.Pandoc.Parsing.HasIdentifierList Text.Pandoc.Readers.MediaWiki.MWState
instance Text.Pandoc.Parsing.HasLogMessages Text.Pandoc.Readers.MediaWiki.MWState


-- | Conversion of markdown-formatted plain text to <a>Pandoc</a> document.
module Text.Pandoc.Readers.Markdown

-- | Read markdown from an input string and return a Pandoc document.
readMarkdown :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

module Text.Pandoc.Readers.OPML
readOPML :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
instance GHC.Show.Show Text.Pandoc.Readers.OPML.OPMLState
instance Data.Default.Class.Default Text.Pandoc.Readers.OPML.OPMLState

module Text.Pandoc.Readers.EPUB
readEPUB :: PandocMonad m => ReaderOptions -> ByteString -> m Pandoc


-- | Conversion of creole text to <a>Pandoc</a> document.
module Text.Pandoc.Readers.Creole

-- | Read creole from an input string and return a Pandoc document.
readCreole :: PandocMonad m => ReaderOptions -> Text -> m Pandoc


-- | This helper module exports the readers.
--   
--   Note: all of the readers assume that the input text has <tt>'\n'</tt>
--   line endings. So if you get your input text from a web form, you
--   should remove <tt>'\r'</tt> characters using <tt>filter (/='\r')</tt>.
module Text.Pandoc.Readers
data Reader m
TextReader :: (ReaderOptions -> Text -> m Pandoc) -> Reader m
ByteStringReader :: (ReaderOptions -> ByteString -> m Pandoc) -> Reader m

-- | Association list of formats and readers.
readers :: PandocMonad m => [(String, Reader m)]
readDocx :: PandocMonad m => ReaderOptions -> ByteString -> m Pandoc
readOdt :: PandocMonad m => ReaderOptions -> ByteString -> m Pandoc

-- | Read markdown from an input string and return a Pandoc document.
readMarkdown :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

-- | Parse a CommonMark formatted string into a <a>Pandoc</a> structure.
readCommonMark :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

-- | Read creole from an input string and return a Pandoc document.
readCreole :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

-- | Read mediawiki from an input string and return a Pandoc document.
readMediaWiki :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
readVimwiki :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

-- | Parse reStructuredText string and return Pandoc document.
readRST :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

-- | Parse org-mode string and return a Pandoc document.
readOrg :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

-- | Parse LaTeX from string and return <a>Pandoc</a> document.
readLaTeX :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

-- | Convert HTML-formatted string to <a>Pandoc</a> document.
readHtml :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
readJATS :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

-- | Parse a Textile text and return a Pandoc document.
readTextile :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
readDocBook :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
readOPML :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

-- | Parse Haddock markup and return a <a>Pandoc</a> document.
readHaddock :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

-- | Read native formatted text and return a Pandoc document. The input may
--   be a full pandoc document, a block list, a block, an inline list, or
--   an inline. Thus, for example,
--   
--   <pre>
--   Str "hi"
--   </pre>
--   
--   will be treated as if it were
--   
--   <pre>
--   Pandoc nullMeta [Plain [Str "hi"]]
--   </pre>
readNative :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

-- | Read pandoc document from JSON format.
readJSON :: ReaderOptions -> Text -> Either PandocError Pandoc

-- | Read twiki from an input string and return a Pandoc document.
readTWiki :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

-- | Read TikiWiki from an input string and return a Pandoc document.
readTikiWiki :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

-- | Read Txt2Tags from an input string returning a Pandoc document
readTxt2Tags :: PandocMonad m => ReaderOptions -> Text -> m Pandoc
readEPUB :: PandocMonad m => ReaderOptions -> ByteString -> m Pandoc

-- | Read Muse from an input string and return a Pandoc document.
readMuse :: PandocMonad m => ReaderOptions -> Text -> m Pandoc

-- | Retrieve reader, extensions based on formatSpec (format+extensions).
getReader :: PandocMonad m => String -> Either String (Reader m, Extensions)

-- | Default extensions from format-describing string.
getDefaultExtensions :: String -> Extensions


-- | Conversion of <a>Pandoc</a> documents to custom markup using a lua
--   writer.
module Text.Pandoc.Writers.Custom

-- | Convert Pandoc to custom markup.
writeCustom :: FilePath -> WriterOptions -> Pandoc -> PandocIO Text
instance GHC.Show.Show Text.Pandoc.Writers.Custom.PandocLuaException
instance GHC.Exception.Exception Text.Pandoc.Writers.Custom.PandocLuaException
instance (Foreign.Lua.Types.ToLuaStack.ToLuaStack a, Foreign.Lua.Types.ToLuaStack.ToLuaStack b) => Foreign.Lua.Types.ToLuaStack.ToLuaStack (Text.Pandoc.Writers.Custom.KeyValue a b)
instance Foreign.Lua.Types.ToLuaStack.ToLuaStack (Text.Pandoc.Writers.Custom.Stringify Text.Pandoc.Definition.Format)
instance Foreign.Lua.Types.ToLuaStack.ToLuaStack (Text.Pandoc.Writers.Custom.Stringify [Text.Pandoc.Definition.Inline])
instance Foreign.Lua.Types.ToLuaStack.ToLuaStack (Text.Pandoc.Writers.Custom.Stringify [Text.Pandoc.Definition.Block])
instance Foreign.Lua.Types.ToLuaStack.ToLuaStack (Text.Pandoc.Writers.Custom.Stringify Text.Pandoc.Definition.MetaValue)
instance Foreign.Lua.Types.ToLuaStack.ToLuaStack (Text.Pandoc.Writers.Custom.Stringify Text.Pandoc.Definition.Citation)


-- | This helper module exports all writers functions.
module Text.Pandoc.Writers
data Writer m
TextWriter :: (WriterOptions -> Pandoc -> m Text) -> Writer m
ByteStringWriter :: (WriterOptions -> Pandoc -> m ByteString) -> Writer m

-- | Association list of formats and writers.
writers :: PandocMonad m => [(String, Writer m)]

-- | Convert Pandoc to AsciiDoc.
writeAsciiDoc :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to LaTeX Beamer.
writeBeamer :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to CommonMark.
writeCommonMark :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to ConTeXt.
writeConTeXt :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to custom markup.
writeCustom :: FilePath -> WriterOptions -> Pandoc -> PandocIO Text

-- | Convert Pandoc document to DZSlides HTML slide show.
writeDZSlides :: PandocMonad m => WriterOptions -> Pandoc -> m Text
writeDocbook4 :: PandocMonad m => WriterOptions -> Pandoc -> m Text
writeDocbook5 :: PandocMonad m => WriterOptions -> Pandoc -> m Text
writeDocx :: (PandocMonad m) => WriterOptions -> Pandoc -> m ByteString

-- | Convert Pandoc to DokuWiki.
writeDokuWiki :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Produce an EPUB2 file from a Pandoc document.
writeEPUB2 :: PandocMonad m => WriterOptions -> Pandoc -> m ByteString

-- | Produce an EPUB3 file from a Pandoc document.
writeEPUB3 :: PandocMonad m => WriterOptions -> Pandoc -> m ByteString

-- | Produce an FB2 document from a <a>Pandoc</a> document.
writeFB2 :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to Haddock.
writeHaddock :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc document to Html 4 structure.
writeHtml4 :: PandocMonad m => WriterOptions -> Pandoc -> m Html

-- | Convert Pandoc document to Html 4 string.
writeHtml4String :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc document to Html 5 structure.
writeHtml5 :: PandocMonad m => WriterOptions -> Pandoc -> m Html

-- | Convert Pandoc document to Html 5 string.
writeHtml5String :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc document to string in ICML format.
writeICML :: PandocMonad m => WriterOptions -> Pandoc -> m Text
writeJATS :: PandocMonad m => WriterOptions -> Pandoc -> m Text
writeJSON :: WriterOptions -> Pandoc -> Text

-- | Convert Pandoc to LaTeX.
writeLaTeX :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to Man.
writeMan :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to Markdown.
writeMarkdown :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to MediaWiki.
writeMediaWiki :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to Ms.
writeMs :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to Muse.
writeMuse :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Prettyprint Pandoc document.
writeNative :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Produce an ODT file from a Pandoc document.
writeODT :: PandocMonad m => WriterOptions -> Pandoc -> m ByteString

-- | Convert Pandoc document to string in OPML format.
writeOPML :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc document to string in OpenDocument format.
writeOpenDocument :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to Org.
writeOrg :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to plain text (like markdown, but without links,
--   pictures, or inline formatting).
writePlain :: PandocMonad m => WriterOptions -> Pandoc -> m Text
writePowerpoint :: (PandocMonad m) => WriterOptions -> Pandoc -> m ByteString

-- | Convert Pandoc to RST.
writeRST :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to a string in rich text format.
writeRTF :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc document to Reveal JS HTML slide show.
writeRevealJs :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc document to S5 HTML slide show.
writeS5 :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc document to Slideous HTML slide show.
writeSlideous :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc document to Slidy HTML slide show.
writeSlidy :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc document to string in Docbook format.
writeTEI :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to Texinfo.
writeTexinfo :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to Textile.
writeTextile :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Convert Pandoc to ZimWiki.
writeZimWiki :: PandocMonad m => WriterOptions -> Pandoc -> m Text

-- | Retrieve writer, extensions based on formatSpec (format+extensions).
getWriter :: PandocMonad m => String -> Either String (Writer m, Extensions)


-- | Running pandoc Lua filters.
module Text.Pandoc.Lua

-- | Exceptions raised by Lua-related operations.
data LuaException :: *
LuaException :: String -> LuaException

-- | Run the Lua filter in <tt>filterPath</tt> for a transformation to
--   target format <tt>format</tt>. Pandoc uses Lua init files to setup the
--   Lua interpreter.
runLuaFilter :: FilePath -> String -> Pandoc -> PandocIO (Either LuaException Pandoc)

-- | Run the lua interpreter, using pandoc's default way of environment
--   initalization.
runPandocLua :: Lua a -> PandocIO (Either LuaException a)

-- | DEPRECATED: Push the pandoc module to the Lua Stack.
pushPandocModule :: Maybe FilePath -> Lua NumResults


-- | This helper module exports the main writers, readers, and data
--   structure definitions from the Pandoc libraries.
--   
--   A typical application will chain together a reader and a writer to
--   convert strings from one format to another. For example, the following
--   simple program will act as a filter converting markdown fragments to
--   reStructuredText, using reference-style links instead of inline links:
--   
--   <pre>
--   module Main where
--   import Text.Pandoc
--   import Data.Text (Text)
--   import qualified Data.Text.IO as T
--   
--   mdToRST :: Text -&gt; IO Text
--   mdToRST txt = runIOorExplode $
--     readMarkdown def txt
--     &gt;&gt;= writeRST def{ writerReferenceLinks = True }
--   </pre>
--   
--   <pre>
--   main :: IO ()
--   main = do
--     T.getContents &gt;&gt;= mdToRST &gt;&gt;= T.putStrLn
--   </pre>
module Text.Pandoc

-- | Version number of pandoc library.
pandocVersion :: String


-- | Does a pandoc conversion based on command-line options.
module Text.Pandoc.App
convertWithOpts :: Opt -> IO ()

-- | Data structure for command line options.
data Opt
Opt :: Int -> Bool -> Bool -> Maybe String -> Maybe String -> Bool -> Int -> Maybe FilePath -> [(String, String)] -> [(String, String)] -> Maybe FilePath -> [FilePath] -> Bool -> [Int] -> Bool -> Bool -> Bool -> Bool -> Maybe String -> [FilePath] -> TopLevelDivision -> HTMLMathMethod -> Maybe FilePath -> Maybe FilePath -> String -> Maybe FilePath -> [FilePath] -> Int -> Maybe FilePath -> Int -> Bool -> Bool -> Verbosity -> Bool -> Maybe FilePath -> Bool -> Bool -> ReferenceLocation -> Int -> WrapOption -> Int -> [FilePath] -> [FilePath] -> ObfuscationMethod -> String -> Bool -> [String] -> Maybe FilePath -> CiteMethod -> Bool -> Maybe String -> [String] -> Maybe Int -> Bool -> Bool -> String -> Maybe FilePath -> TrackChanges -> Bool -> Maybe String -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> [FilePath] -> [(String, String)] -> LineEnding -> Bool -> Opt

-- | Number of spaces per tab
[optTabStop] :: Opt -> Int

-- | Preserve tabs instead of converting to spaces
[optPreserveTabs] :: Opt -> Bool

-- | Include header, footer
[optStandalone] :: Opt -> Bool

-- | Reader format
[optReader] :: Opt -> Maybe String

-- | Writer format
[optWriter] :: Opt -> Maybe String

-- | Include table of contents
[optTableOfContents] :: Opt -> Bool

-- | Base header level
[optBaseHeaderLevel] :: Opt -> Int

-- | Custom template
[optTemplate] :: Opt -> Maybe FilePath

-- | Template variables to set
[optVariables] :: Opt -> [(String, String)]

-- | Metadata fields to set
[optMetadata] :: Opt -> [(String, String)]

-- | Name of output file
[optOutputFile] :: Opt -> Maybe FilePath

-- | Names of input files
[optInputFiles] :: Opt -> [FilePath]

-- | Number sections in LaTeX
[optNumberSections] :: Opt -> Bool

-- | Starting number for sections
[optNumberOffset] :: Opt -> [Int]

-- | Put sections in div tags in HTML
[optSectionDivs] :: Opt -> Bool

-- | Use incremental lists in Slidy<i>Slideous</i>S5
[optIncremental] :: Opt -> Bool

-- | Make HTML accessible offline
[optSelfContained] :: Opt -> Bool

-- | Use <a>q</a> tags in HTML
[optHtmlQTags] :: Opt -> Bool

-- | Style to use for highlighted code
[optHighlightStyle] :: Opt -> Maybe String

-- | xml syntax defs to load
[optSyntaxDefinitions] :: Opt -> [FilePath]

-- | Type of the top-level divisions
[optTopLevelDivision] :: Opt -> TopLevelDivision

-- | Method to print HTML math
[optHTMLMathMethod] :: Opt -> HTMLMathMethod

-- | Path to abbrevs file
[optAbbreviations] :: Opt -> Maybe FilePath

-- | Path of reference doc
[optReferenceDoc] :: Opt -> Maybe FilePath

-- | EPUB subdir in OCF container
[optEpubSubdirectory] :: Opt -> String

-- | EPUB metadata
[optEpubMetadata] :: Opt -> Maybe FilePath

-- | EPUB fonts to embed
[optEpubFonts] :: Opt -> [FilePath]

-- | Header level at which to split chapters
[optEpubChapterLevel] :: Opt -> Int

-- | Cover image for epub
[optEpubCoverImage] :: Opt -> Maybe FilePath

-- | Number of levels to include in TOC
[optTOCDepth] :: Opt -> Int

-- | Output command-line arguments
[optDumpArgs] :: Opt -> Bool

-- | Ignore command-line arguments
[optIgnoreArgs] :: Opt -> Bool

-- | Verbosity of diagnostic output
[optVerbosity] :: Opt -> Verbosity

-- | Enable tracing
[optTrace] :: Opt -> Bool

-- | File to write JSON log output
[optLogFile] :: Opt -> Maybe FilePath

-- | Fail on warnings
[optFailIfWarnings] :: Opt -> Bool

-- | Use reference links in writing markdown, rst
[optReferenceLinks] :: Opt -> Bool

-- | location for footnotes and link references in markdown output
[optReferenceLocation] :: Opt -> ReferenceLocation

-- | Dpi
[optDpi] :: Opt -> Int

-- | Options for wrapping text
[optWrapText] :: Opt -> WrapOption

-- | Line length in characters
[optColumns] :: Opt -> Int

-- | Filters to apply
[optFilters] :: Opt -> [FilePath]

-- | Lua filters to apply
[optLuaFilters] :: Opt -> [FilePath]
[optEmailObfuscation] :: Opt -> ObfuscationMethod
[optIdentifierPrefix] :: Opt -> String

-- | Strip empty paragraphs
[optStripEmptyParagraphs] :: Opt -> Bool

-- | Default classes for indented code blocks
[optIndentedCodeClasses] :: Opt -> [String]
[optDataDir] :: Opt -> Maybe FilePath

-- | Method to output cites
[optCiteMethod] :: Opt -> CiteMethod

-- | Use listings package for code blocks
[optListings] :: Opt -> Bool

-- | Program to use for latex/html -&gt; pdf
[optPdfEngine] :: Opt -> Maybe String

-- | Flags to pass to the engine
[optPdfEngineArgs] :: Opt -> [String]

-- | Header level that creates slides
[optSlideLevel] :: Opt -> Maybe Int

-- | Use atx headers for markdown level 1-2
[optSetextHeaders] :: Opt -> Bool

-- | Use ascii characters only in html
[optAscii] :: Opt -> Bool

-- | Default image extension
[optDefaultImageExtension] :: Opt -> String

-- | Path to extract embedded media
[optExtractMedia] :: Opt -> Maybe FilePath

-- | Accept or reject MS Word track-changes.
[optTrackChanges] :: Opt -> TrackChanges

-- | Parse input files before combining
[optFileScope] :: Opt -> Bool

-- | Prefix for title
[optTitlePrefix] :: Opt -> Maybe String

-- | CSS files to link to
[optCss] :: Opt -> [FilePath]

-- | Files to include before
[optIncludeBeforeBody] :: Opt -> [FilePath]

-- | Files to include after body
[optIncludeAfterBody] :: Opt -> [FilePath]

-- | Files to include in header
[optIncludeInHeader] :: Opt -> [FilePath]

-- | Path to search for images etc
[optResourcePath] :: Opt -> [FilePath]

-- | Headers for HTTP requests
[optRequestHeaders] :: Opt -> [(String, String)]

-- | Style of line-endings to use
[optEol] :: Opt -> LineEnding

-- | Skip HTML comments
[optStripComments] :: Opt -> Bool

-- | Defaults for command-line options.
defaultOpts :: Opt
parseOptions :: [OptDescr (Opt -> IO Opt)] -> Opt -> IO Opt

-- | A list of functions, each transforming the options data structure in
--   response to a command-line option.
options :: [OptDescr (Opt -> IO Opt)]
applyFilters :: MonadIO m => ReaderOptions -> Maybe FilePath -> [FilePath] -> [String] -> Pandoc -> m Pandoc
applyLuaFilters :: Maybe FilePath -> [FilePath] -> String -> Pandoc -> PandocIO Pandoc
instance Data.Aeson.Types.ToJSON.ToJSON Text.Pandoc.App.Opt
instance Data.Aeson.Types.FromJSON.FromJSON Text.Pandoc.App.Opt
instance Data.Aeson.Types.ToJSON.ToJSON Text.Pandoc.App.LineEnding
instance Data.Aeson.Types.FromJSON.FromJSON Text.Pandoc.App.LineEnding
instance GHC.Show.Show Text.Pandoc.App.Opt
instance GHC.Generics.Generic Text.Pandoc.App.Opt
instance GHC.Generics.Generic Text.Pandoc.App.LineEnding
instance GHC.Show.Show Text.Pandoc.App.LineEnding
