diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2018-10-31 00:09:55 +0300 |
---|---|---|
committer | Alexander Krotov <ilabdsf@gmail.com> | 2018-10-31 00:09:55 +0300 |
commit | 51685cafded9791ffe9d0295f22107daec92ef43 (patch) | |
tree | 6c3bde7504b3f8d0781936cde3d1e5ce0b98d167 /src | |
parent | 6f6e4c0d844688ab88a5b73d566eb76a74a91963 (diff) | |
download | pandoc-51685cafded9791ffe9d0295f22107daec92ef43.tar.gz |
Generalize parseFromString'
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Parsing.hs | 6 |
1 files changed, 3 insertions, 3 deletions
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 |