git.iko.soy/typeable/pandoc
on master help sign in
Man reader: use mapLeft from Shared.
commitec07a5298c27ff6b6fb59cbc29aa91f0469650d5 authorJohn MacFarlane <jgm@berkeley.edu> dateThu 29 Nov 2018, 13:28 (8 years ago) parentcefb088
1 file changed+1−6
src/Text/Pandoc/Readers/Man.hs+1−6
src/Text/Pandoc/Readers/Man.hs+1−6
@@ -49,7 +49,7 @@ import Text.Pandoc.Logging (LogMessage(..))
4949import Text.Pandoc.Options
5050import Text.Pandoc.Parsing
5151import Text.Pandoc.Walk (query)
52−import Text.Pandoc.Shared (crFilter)
52+import Text.Pandoc.Shared (crFilter, mapLeft)
5353import Text.Pandoc.Readers.Roff -- TODO explicit imports
5454import Text.Parsec hiding (tokenPrim)
5555import qualified Text.Parsec as Parsec
@@ -87,11 +87,6 @@ readWithMTokens parser state input =
8787 let leftF = PandocParsecError . intercalate "\n" $ show <$> input
8888 in mapLeft leftF `liftM` runParserT parser state "source" input
8989
90−mapLeft :: (a -> c) -> Either a b -> Either c b
91−mapLeft f (Left x) = Left $ f x
92−mapLeft _ (Right r) = Right r
93−
94−
9590parseMan :: PandocMonad m => ManParser m Pandoc
9691parseMan = do
9792 bs <- many parseBlock <* eof