@@ -49,7 +49,7 @@ import Text.Pandoc.Logging (LogMessage(..))
49import Text.Pandoc.Options
49import Text.Pandoc.Options
50import Text.Pandoc.Parsing
50import Text.Pandoc.Parsing
51import Text.Pandoc.Walk (query)
51import Text.Pandoc.Walk (query)
52−import Text.Pandoc.Shared (crFilter)
52+import Text.Pandoc.Shared (crFilter, mapLeft)
53import Text.Pandoc.Readers.Roff -- TODO explicit imports
53import Text.Pandoc.Readers.Roff -- TODO explicit imports
54import Text.Parsec hiding (tokenPrim)
54import Text.Parsec hiding (tokenPrim)
55import qualified Text.Parsec as Parsec
55import qualified Text.Parsec as Parsec
@@ -87,11 +87,6 @@ readWithMTokens parser state input =
87 let leftF = PandocParsecError . intercalate "\n" $ show <$> input
87 let leftF = PandocParsecError . intercalate "\n" $ show <$> input
88 in mapLeft leftF `liftM` runParserT parser state "source" input
88 in mapLeft leftF `liftM` runParserT parser state "source" input
90−mapLeft :: (a -> c) -> Either a b -> Either c b
91−mapLeft f (Left x) = Left $ f x
92−mapLeft _ (Right r) = Right r
95parseMan :: PandocMonad m => ManParser m Pandoc
90parseMan :: PandocMonad m => ManParser m Pandoc
96parseMan = do
91parseMan = do
97 bs <- many parseBlock <* eof
92 bs <- many parseBlock <* eof