aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-10-09 18:26:50 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-10-09 18:26:50 +0300
commit4d9ccb163ed6a4a4a3eeb6d225feec28205cb7b4 (patch)
tree0354763a6bd03d7a8f63b45792044f4c3f358b70 /src/Text/Pandoc/Readers
parentca1624daa2a708342f1da3716c3883a109302a8e (diff)
downloadpandoc-4d9ccb163ed6a4a4a3eeb6d225feec28205cb7b4.tar.gz
Get rid of mapLeft in Muse reader
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Muse.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/Muse.hs b/src/Text/Pandoc/Readers/Muse.hs
index 409548cb3..6a1d69506 100644
--- a/src/Text/Pandoc/Readers/Muse.hs
+++ b/src/Text/Pandoc/Readers/Muse.hs
@@ -60,7 +60,7 @@ import Text.Pandoc.Error (PandocError (PandocParsecError))
import Text.Pandoc.Logging
import Text.Pandoc.Options
import Text.Pandoc.Parsing hiding (F, enclosed)
-import Text.Pandoc.Shared (crFilter, underlineSpan, mapLeft)
+import Text.Pandoc.Shared (crFilter, underlineSpan)
-- | Read Muse from an input string and return a Pandoc document.
readMuse :: PandocMonad m
@@ -69,9 +69,9 @@ readMuse :: PandocMonad m
-> m Pandoc
readMuse opts s = do
let input = crFilter s
- res <- mapLeft (PandocParsecError $ unpack input) `liftM` runReaderT (runParserT parseMuse def{ museOptions = opts } "source" input) def
+ res <- runReaderT (runParserT parseMuse def{ museOptions = opts } "source" input) def
case res of
- Left e -> throwError e
+ Left e -> throwError $ PandocParsecError (unpack input) e
Right d -> return d
type F = Future MuseState