aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Parsing.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Parsing.hs')
-rw-r--r--src/Text/Pandoc/Parsing.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs
index 8d3799c3e..10a08d410 100644
--- a/src/Text/Pandoc/Parsing.hs
+++ b/src/Text/Pandoc/Parsing.hs
@@ -1128,13 +1128,13 @@ gridTableFooter = optional blanklines
---
-- | Removes the ParsecT layer from the monad transformer stack
-readWithM :: (Stream s m Char, ToText s)
- => ParserT s st m a -- ^ parser
+readWithM :: Monad m
+ => ParserT Text st m a -- ^ parser
-> st -- ^ initial state
- -> s -- ^ input
+ -> Text -- ^ input
-> m (Either PandocError a)
readWithM parser state input =
- mapLeft (PandocParsecError $ toText input) `liftM` runParserT parser state "source" input
+ mapLeft (PandocParsecError input) <$> runParserT parser state "source" input
-- | Parse a string with a given parser and state
readWith :: Parser Text st a