aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-10-31 00:09:55 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-10-31 00:09:55 +0300
commit51685cafded9791ffe9d0295f22107daec92ef43 (patch)
tree6c3bde7504b3f8d0781936cde3d1e5ce0b98d167 /src/Text
parent6f6e4c0d844688ab88a5b73d566eb76a74a91963 (diff)
downloadpandoc-51685cafded9791ffe9d0295f22107daec92ef43.tar.gz
Generalize parseFromString'
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Parsing.hs6
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