Man reader: use mapLeft from Shared.
This commit is contained in:
parent
cefb0886c3
commit
ec07a5298c
1 changed files with 1 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue