Derive MonadThrow and MonadCatch for ClientM

This commit is contained in:
Hamish Mackenzie 2016-10-27 22:32:41 +13:00
parent 9e809a0756
commit 49931913c9

View file

@ -12,7 +12,7 @@ import Prelude.Compat
import Control.Exception
import Control.Monad
import Control.Monad.Catch (MonadThrow)
import Control.Monad.Catch (MonadThrow, MonadCatch)
#if MIN_VERSION_mtl(2,2,0)
import Control.Monad.Except (MonadError(..))
@ -176,6 +176,7 @@ newtype ClientM a = ClientM { runClientM' :: ReaderT ClientEnv (ExceptT ServantE
deriving ( Functor, Applicative, Monad, MonadIO, Generic
, MonadReader ClientEnv
, MonadError ServantError
, MonadThrow, MonadCatch
)
runClientM :: ClientM a -> ClientEnv -> IO (Either ServantError a)