From 51685cafded9791ffe9d0295f22107daec92ef43 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Wed, 31 Oct 2018 00:09:55 +0300 Subject: Generalize parseFromString' --- src/Text/Pandoc/Parsing.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index 15c1c0b18..90c2d09dc 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -477,10 +477,10 @@ parseFromString parser str = do -- | Like 'parseFromString' but specialized for 'ParserState'. -- This resets 'stateLastStrPos', which is almost always what we want. -parseFromString' :: Monad m - => ParserT String ParserState m a +parseFromString' :: (Monad m, Stream s m Char, IsString s) + => ParserT s ParserState m a -> String - -> ParserT String ParserState m a + -> ParserT s ParserState m a parseFromString' parser str = do oldStrPos <- stateLastStrPos <$> getState res <- parseFromString parser str -- cgit v1.2.3