@@ -104,10 +104,6 @@ module Text.Pandoc.Parsing ( anyLine,
104104 applyMacros',
105105 Parser,
106106 ParserT,
107− F(..),
108− runF,
109− askF,
110− asksF,
111107 token,
112108 generalize,
113109 -- * Re-exports from Text.Pandoc.Parsec
@@ -189,7 +185,7 @@ import Data.Default
189185import qualified Data.Set as Set
190186import Control.Monad.Reader
191187import Control.Monad.Identity
192−import Control.Applicative ((<$>), (<*>), (*>), (<*), (<$), Applicative)
188+import Control.Applicative ((<$>), (<*>), (*>), (<*), (<$))
193189import Data.Monoid
194190import Data.Maybe (catMaybes)
195191
@@ -197,22 +193,6 @@ type Parser t s = Parsec t s
197193
198194type ParserT = ParsecT
199195
200−newtype F a = F { unF :: Reader ParserState a } deriving (Monad, Applicative, Functor)
201−
202−runF :: F a -> ParserState -> a
203−runF = runReader . unF
204−
205−askF :: F ParserState
206−askF = F ask
207−
208−asksF :: (ParserState -> a) -> F a
209−asksF f = F $ asks f
210−
211−instance Monoid a => Monoid (F a) where
212− mempty = return mempty
213− mappend = liftM2 mappend
214− mconcat = liftM mconcat . sequence
215−
216196-- | Parse any line of text
217197anyLine :: Stream [Char] m Char => ParserT [Char] st m [Char]
218198anyLine = do
@@ -914,7 +894,6 @@ data ParserState = ParserState
914894 stateNotes :: NoteTable, -- ^ List of notes (raw bodies)
915895 stateNotes' :: NoteTable', -- ^ List of notes (parsed bodies)
916896 stateMeta :: Meta, -- ^ Document metadata
917− stateMeta' :: F Meta, -- ^ Document metadata
918897 stateHeaderTable :: [HeaderType], -- ^ Ordered list of header types used
919898 stateHeaders :: M.Map Inlines String, -- ^ List of headers and ids (used for implicit ref links)
920899 stateIdentifiers :: [String], -- ^ List of header identifiers used
@@ -1011,7 +990,6 @@ defaultParserState =
1011990 stateNotes = [],
1012991 stateNotes' = [],
1013992 stateMeta = nullMeta,
1014− stateMeta' = return nullMeta,
1015993 stateHeaderTable = [],
1016994 stateHeaders = M.empty,
1017995 stateIdentifiers = [],
@@ -1063,7 +1041,7 @@ data QuoteContext
10631041
10641042type NoteTable = [(String, String)]
10651043
1066−type NoteTable' = [(String, F Blocks)] -- used in markdown reader
1044+type NoteTable' = [(String, Blocks)] -- used in markdown reader
10671045
10681046newtype Key = Key String deriving (Show, Read, Eq, Ord)
10691047