aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Class.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2016-12-03 22:35:58 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-01-25 17:07:40 +0100
commitd7583f365951373158a55ce344ba6b345ea481ec (patch)
treed8c1d4c0b0b734f4ba6309ba2428a9eec4fb4284 /src/Text/Pandoc/Class.hs
parent1a0d93a1d33b6b15be15690df9f8aa305cf965b3 (diff)
downloadpandoc-d7583f365951373158a55ce344ba6b345ea481ec.tar.gz
Error: change type of handleError.
It now lives in IO and gives a proper message + exit instead of calling 'error'. We shouldn't be making it easier for people to raise error on pure code. And this is better for the main application in IO.
Diffstat (limited to 'src/Text/Pandoc/Class.hs')
-rw-r--r--src/Text/Pandoc/Class.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Class.hs b/src/Text/Pandoc/Class.hs
index 7227742b2..8d3a73d08 100644
--- a/src/Text/Pandoc/Class.hs
+++ b/src/Text/Pandoc/Class.hs
@@ -190,7 +190,7 @@ withWarningsToStderr f = do
return x
runIOorExplode :: PandocIO a -> IO a
-runIOorExplode ma = handleError <$> runIO ma
+runIOorExplode ma = runIO ma >>= handleError
newtype PandocIO a = PandocIO {
unPandocIO :: ExceptT PandocError (StateT CommonState IO) a