diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-11-29 13:28:43 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-11-29 13:28:56 -0800 |
commit | ec07a5298c27ff6b6fb59cbc29aa91f0469650d5 (patch) | |
tree | bfa2c85173502edac53164c1f05ac93c2d7c0f9b /src | |
parent | cefb0886c30a54a047b7cc92a03eeefd1bfbbba4 (diff) | |
download | pandoc-ec07a5298c27ff6b6fb59cbc29aa91f0469650d5.tar.gz |
Man reader: use mapLeft from Shared.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Readers/Man.hs | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Readers/Man.hs b/src/Text/Pandoc/Readers/Man.hs index fa5ffbdfa..db61a5025 100644 --- a/src/Text/Pandoc/Readers/Man.hs +++ b/src/Text/Pandoc/Readers/Man.hs @@ -49,7 +49,7 @@ import Text.Pandoc.Logging (LogMessage(..)) import Text.Pandoc.Options import Text.Pandoc.Parsing import Text.Pandoc.Walk (query) -import Text.Pandoc.Shared (crFilter) +import Text.Pandoc.Shared (crFilter, mapLeft) import Text.Pandoc.Readers.Roff -- TODO explicit imports import Text.Parsec hiding (tokenPrim) import qualified Text.Parsec as Parsec @@ -87,11 +87,6 @@ readWithMTokens parser state input = let leftF = PandocParsecError . intercalate "\n" $ show <$> input in mapLeft leftF `liftM` runParserT parser state "source" input -mapLeft :: (a -> c) -> Either a b -> Either c b -mapLeft f (Left x) = Left $ f x -mapLeft _ (Right r) = Right r - - parseMan :: PandocMonad m => ManParser m Pandoc parseMan = do bs <- many parseBlock <* eof |