From b57e554b59236eab7c9298b4b5bf6d32e5d7cda8 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Wed, 30 Jul 2014 00:48:40 +0100 Subject: Except Compat: Updated to export more module functions --- src/Text/Pandoc/Compat/Except.hs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/Text') 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 -- cgit v1.2.3