pandoc-2.5: Conversion between markup formats

Copyright | Copyright (C) 2006-2018 John MacFarlane
License | GNU GPL, version 2 or above
Maintainer | John MacFarlane <jgm@berkeley.edu>
Stability | alpha
Portability | portable
Safe Haskell | None
Language | Haskell2010

Text.Pandoc.Logging

Description

This module provides data types and functions for warnings and info messages.

Synopsis

- data Verbosity
  - = ERROR
  - | WARNING
  - | INFO
- data LogMessage
  - = SkippedContent String SourcePos
  - | CouldNotParseYamlMetadata String SourcePos
  - | DuplicateLinkReference String SourcePos
  - | DuplicateNoteReference String SourcePos
  - | NoteDefinedButNotUsed String SourcePos
  - | DuplicateIdentifier String SourcePos
  - | ReferenceNotFound String SourcePos
  - | CircularReference String SourcePos
  - | UndefinedToggle String SourcePos
  - | ParsingUnescaped String SourcePos
  - | CouldNotLoadIncludeFile String SourcePos
  - | MacroAlreadyDefined String SourcePos
  - | InlineNotRendered Inline
  - | BlockNotRendered Block
  - | DocxParserWarning String
  - | IgnoredIOError String
  - | CouldNotFetchResource String String
  - | CouldNotDetermineImageSize String String
  - | CouldNotConvertImage String String
  - | CouldNotDetermineMimeType String
  - | CouldNotConvertTeXMath String String
  - | CouldNotParseCSS String
  - | Fetching String
  - | Extracting String
  - | NoTitleElement String
  - | NoLangSpecified
  - | InvalidLang String
  - | CouldNotHighlight String
  - | MissingCharacter String
  - | Deprecated String String
  - | NoTranslation String
  - | CouldNotLoadTranslations String String
  - | UnexpectedXmlElement String String
- encodeLogMessages :: [LogMessage] -> ByteString
- showLogMessage :: LogMessage -> String
- messageVerbosity :: LogMessage -> Verbosity

# Documentation

data Verbosity Source #

Verbosity level.

Constructors

ERROR |
WARNING |
INFO |

Instances

Bounded Verbosity Source # |
Instance details Defined in Text.Pandoc.Logging Methods minBound :: Verbosity Source # maxBound :: Verbosity Source #
Enum Verbosity Source # |

Instance details

Defined in Text.Pandoc.Logging

Methods

succ :: Verbosity -> Verbosity Source #

pred :: Verbosity -> Verbosity Source #

toEnum :: Int -> Verbosity Source #

fromEnum :: Verbosity -> Int Source #

enumFrom :: Verbosity -> [Verbosity] Source #

enumFromThen :: Verbosity -> Verbosity -> [Verbosity] Source #

enumFromTo :: Verbosity -> Verbosity -> [Verbosity] Source #

enumFromThenTo :: Verbosity -> Verbosity -> Verbosity -> [Verbosity] Source #

Eq Verbosity Source # |
Instance details Defined in Text.Pandoc.Logging Methods (==) :: Verbosity -> Verbosity -> Bool Source # (/=) :: Verbosity -> Verbosity -> Bool Source #
Data Verbosity Source # |

Instance details

Defined in Text.Pandoc.Logging

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Verbosity -> c Verbosity Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Verbosity Source #

toConstr :: Verbosity -> Constr Source #

dataTypeOf :: Verbosity -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Verbosity) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Verbosity) Source #

gmapT :: (forall b. Data b => b -> b) -> Verbosity -> Verbosity Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Verbosity -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Verbosity -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Verbosity -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Verbosity -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Verbosity -> m Verbosity Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Verbosity -> m Verbosity Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Verbosity -> m Verbosity Source #

Ord Verbosity Source # |

Instance details

Defined in Text.Pandoc.Logging

Methods

compare :: Verbosity -> Verbosity -> Ordering Source #

(<) :: Verbosity -> Verbosity -> Bool Source #

(<=) :: Verbosity -> Verbosity -> Bool Source #

(>) :: Verbosity -> Verbosity -> Bool Source #

(>=) :: Verbosity -> Verbosity -> Bool Source #

max :: Verbosity -> Verbosity -> Verbosity Source #

min :: Verbosity -> Verbosity -> Verbosity Source #

Read Verbosity Source # |
Instance details Defined in Text.Pandoc.Logging Methods readsPrec :: Int -> ReadS Verbosity Source # readList :: ReadS [Verbosity] Source # readPrec :: ReadPrec Verbosity Source # readListPrec :: ReadPrec [Verbosity] Source #
Show Verbosity Source # |
Instance details Defined in Text.Pandoc.Logging Methods showsPrec :: Int -> Verbosity -> ShowS Source # show :: Verbosity -> String Source # showList :: [Verbosity] -> ShowS Source #
Generic Verbosity Source # |
Instance details Defined in Text.Pandoc.Logging Associated Types type Rep Verbosity :: Type -> Type Source # Methods from :: Verbosity -> Rep Verbosity x Source # to :: Rep Verbosity x -> Verbosity Source #
ToJSON Verbosity Source # |
Instance details Defined in Text.Pandoc.Logging Methods toJSON :: Verbosity -> Value Source # toEncoding :: Verbosity -> Encoding Source # toJSONList :: [Verbosity] -> Value Source # toEncodingList :: [Verbosity] -> Encoding Source #
FromJSON Verbosity Source # |
Instance details Defined in Text.Pandoc.Logging Methods parseJSON :: Value -> Parser Verbosity Source # parseJSONList :: Value -> Parser [Verbosity] Source #
type Rep Verbosity Source # |
Instance details Defined in Text.Pandoc.Logging type Rep Verbosity = D1 (MetaData "Verbosity" "Text.Pandoc.Logging" "pandoc-2.5-6GxD81HTtDK1P5bsnKvhyh" False) (C1 (MetaCons "ERROR" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "WARNING" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "INFO" PrefixI False) (U1 :: Type -> Type)))

data LogMessage Source #

Constructors

SkippedContent String SourcePos |
CouldNotParseYamlMetadata String SourcePos |
DuplicateLinkReference String SourcePos |
DuplicateNoteReference String SourcePos |
NoteDefinedButNotUsed String SourcePos |
DuplicateIdentifier String SourcePos |
ReferenceNotFound String SourcePos |
CircularReference String SourcePos |
UndefinedToggle String SourcePos |
ParsingUnescaped String SourcePos |
CouldNotLoadIncludeFile String SourcePos |
MacroAlreadyDefined String SourcePos |
InlineNotRendered Inline |
BlockNotRendered Block |
DocxParserWarning String |
IgnoredIOError String |
CouldNotFetchResource String String |
CouldNotDetermineImageSize String String |
CouldNotConvertImage String String |
CouldNotDetermineMimeType String |
CouldNotConvertTeXMath String String |
CouldNotParseCSS String |
Fetching String |
Extracting String |
NoTitleElement String |
NoLangSpecified |
InvalidLang String |
CouldNotHighlight String |
MissingCharacter String |
Deprecated String String |
NoTranslation String |
CouldNotLoadTranslations String String |
UnexpectedXmlElement String String |

Instances

Eq LogMessage Source # |
Instance details Defined in Text.Pandoc.Logging Methods (==) :: LogMessage -> LogMessage -> Bool Source # (/=) :: LogMessage -> LogMessage -> Bool Source #
Data LogMessage Source # |

Instance details

Defined in Text.Pandoc.Logging

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> LogMessage -> c LogMessage Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c LogMessage Source #

toConstr :: LogMessage -> Constr Source #

dataTypeOf :: LogMessage -> DataType Source #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c LogMessage) Source #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c LogMessage) Source #

gmapT :: (forall b. Data b => b -> b) -> LogMessage -> LogMessage Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> LogMessage -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> LogMessage -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> LogMessage -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> LogMessage -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> LogMessage -> m LogMessage Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> LogMessage -> m LogMessage Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> LogMessage -> m LogMessage Source #

Ord LogMessage Source # |

Instance details

Defined in Text.Pandoc.Logging

Methods

compare :: LogMessage -> LogMessage -> Ordering Source #

(<) :: LogMessage -> LogMessage -> Bool Source #

(<=) :: LogMessage -> LogMessage -> Bool Source #

(>) :: LogMessage -> LogMessage -> Bool Source #

(>=) :: LogMessage -> LogMessage -> Bool Source #

max :: LogMessage -> LogMessage -> LogMessage Source #

min :: LogMessage -> LogMessage -> LogMessage Source #

Show LogMessage Source # |
Instance details Defined in Text.Pandoc.Logging Methods showsPrec :: Int -> LogMessage -> ShowS Source # show :: LogMessage -> String Source # showList :: [LogMessage] -> ShowS Source #
Generic LogMessage Source # |
Instance details Defined in Text.Pandoc.Logging Associated Types type Rep LogMessage :: Type -> Type Source # Methods from :: LogMessage -> Rep LogMessage x Source # to :: Rep LogMessage x -> LogMessage Source #
ToJSON LogMessage Source # |
Instance details Defined in Text.Pandoc.Logging Methods toJSON :: LogMessage -> Value Source # toEncoding :: LogMessage -> Encoding Source # toJSONList :: [LogMessage] -> Value Source # toEncodingList :: [LogMessage] -> Encoding Source #
Peekable LogMessage Source # |
Instance details Defined in Text.Pandoc.Lua.StackInstances Methods peek :: StackIndex -> Lua LogMessage Source #
Pushable LogMessage Source # |
Instance details Defined in Text.Pandoc.Lua.StackInstances Methods push :: LogMessage -> Lua () Source #
type Rep LogMessage Source # |

Instance details

Defined in Text.Pandoc.Logging

type Rep LogMessage = D1 (MetaData "LogMessage" "Text.Pandoc.Logging" "pandoc-2.5-6GxD81HTtDK1P5bsnKvhyh" False) (((((C1 (MetaCons "SkippedContent" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourcePos)) :+: C1 (MetaCons "CouldNotParseYamlMetadata" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourcePos))) :+: (C1 (MetaCons "DuplicateLinkReference" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourcePos)) :+: C1 (MetaCons "DuplicateNoteReference" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourcePos)))) :+: ((C1 (MetaCons "NoteDefinedButNotUsed" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourcePos)) :+: C1 (MetaCons "DuplicateIdentifier" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourcePos))) :+: (C1 (MetaCons "ReferenceNotFound" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourcePos)) :+: C1 (MetaCons "CircularReference" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourcePos))))) :+: (((C1 (MetaCons "UndefinedToggle" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourcePos)) :+: C1 (MetaCons "ParsingUnescaped" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourcePos))) :+: (C1 (MetaCons "CouldNotLoadIncludeFile" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourcePos)) :+: C1 (MetaCons "MacroAlreadyDefined" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourcePos)))) :+: ((C1 (MetaCons "InlineNotRendered" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Inline)) :+: C1 (MetaCons "BlockNotRendered" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Block))) :+: (C1 (MetaCons "DocxParserWarning" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "IgnoredIOError" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))))) :+: ((((C1 (MetaCons "CouldNotFetchResource" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "CouldNotDetermineImageSize" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))) :+: (C1 (MetaCons "CouldNotConvertImage" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "CouldNotDetermineMimeType" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))) :+: ((C1 (MetaCons "CouldNotConvertTeXMath" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "CouldNotParseCSS" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))) :+: (C1 (MetaCons "Fetching" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "Extracting" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))))) :+: (((C1 (MetaCons "NoTitleElement" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "NoLangSpecified" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "InvalidLang" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "CouldNotHighlight" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)))) :+: ((C1 (MetaCons "MissingCharacter" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "Deprecated" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))) :+: (C1 (MetaCons "NoTranslation" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: (C1 (MetaCons "CouldNotLoadTranslations" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "UnexpectedXmlElement" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))))))))

encodeLogMessages :: [LogMessage] -> ByteString Source #

showLogMessage :: LogMessage -> String Source #

messageVerbosity :: LogMessage -> Verbosity Source #