diff options
author | Matthew Pickering <matthewtpickering@gmail.com> | 2014-07-30 00:48:40 +0100 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2014-07-31 21:39:49 +0100 |
commit | b57e554b59236eab7c9298b4b5bf6d32e5d7cda8 (patch) | |
tree | d03574298efc80c4596a0851454c89b11968c968 /src/Text/Pandoc/Compat | |
parent | 089745af61638bc1e202ac35494059f3157910af (diff) | |
download | pandoc-b57e554b59236eab7c9298b4b5bf6d32e5d7cda8.tar.gz |
Except Compat: Updated to export more module functions
Diffstat (limited to 'src/Text/Pandoc/Compat')
-rw-r--r-- | src/Text/Pandoc/Compat/Except.hs | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Compat/Except.hs b/src/Text/Pandoc/Compat/Except.hs index 7f5648e7a..9ce7c0d36 100644 --- a/src/Text/Pandoc/Compat/Except.hs +++ b/src/Text/Pandoc/Compat/Except.hs @@ -1,7 +1,10 @@ {-# LANGUAGE CPP #-} module Text.Pandoc.Compat.Except ( ExceptT + , Except , Error(..) , runExceptT + , runExcept + , MonadError , throwError , catchError ) where @@ -18,10 +21,17 @@ class Error a where #else import Control.Monad.Error +import Control.Monad.Identity (Identity, runIdentity) + type ExceptT = ErrorT -runExceptT :: ExceptT e m a -> m (Either e a) +type Except s a = ErrorT s Identity a + +runExceptT :: ExceptT e m a -> m (Either e a) runExceptT = runErrorT + +runExcept :: ExceptT e Identity a -> Either e a +runExcept = runIdentity . runExceptT #endif |