From 7ef07ea3fc89a33210cbf92c6bb3a3f553a3f174 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 3 Jan 2013 20:52:51 -0800 Subject: [PATCH] Added stateWarnings. It is not connected to anything yet. --- src/Text/Pandoc/Parsing.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index 9a6ac1671..3aa013fdc 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -726,7 +726,8 @@ data ParserState = ParserState stateExamples :: M.Map String Int, -- ^ Map from example labels to numbers stateHasChapters :: Bool, -- ^ True if \chapter encountered stateMacros :: [Macro], -- ^ List of macros defined so far - stateRstDefaultRole :: String -- ^ Current rST default interpreted text role + stateRstDefaultRole :: String, -- ^ Current rST default interpreted text role + stateWarnings :: [String] -- ^ Warnings generated by the parser } instance Default ParserState where @@ -753,7 +754,8 @@ defaultParserState = stateExamples = M.empty, stateHasChapters = False, stateMacros = [], - stateRstDefaultRole = "title-reference"} + stateRstDefaultRole = "title-reference", + stateWarnings = []} getOption :: (ReaderOptions -> a) -> Parser s ParserState a getOption f = (f . stateOptions) `fmap` getState