Derive MonadThrow and MonadCatch for ClientM
This commit is contained in:
parent
9e809a0756
commit
49931913c9
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue