summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc.hs')
-rw-r--r--src/Text/Pandoc.hs5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/Text/Pandoc.hs b/src/Text/Pandoc.hs
index 27aa02a75..703bb876a 100644
--- a/src/Text/Pandoc.hs
+++ b/src/Text/Pandoc.hs
@@ -309,11 +309,8 @@ class ToJSONFilter a => ToJsonFilter a
toJsonFilter = toJSONFilter
readJSON :: ReaderOptions -> String -> Pandoc
-readJSON _ = checkJSON . eitherDecode' . UTF8.fromStringLazy
+readJSON _ = either error id . eitherDecode' . UTF8.fromStringLazy
writeJSON :: WriterOptions -> Pandoc -> String
writeJSON _ = UTF8.toStringLazy . encode
-checkJSON :: Either String a -> a
-checkJSON (Right x) = x
-checkJSON (Left e) = error e