Merge pull request #629 from hamishmack/master
Derive MonadThrow and MonadCatch for ClientM
This commit is contained in:
commit
67c26cb7bc
1 changed files with 2 additions and 1 deletions
|
@ -12,7 +12,7 @@ import Prelude.Compat
|
||||||
|
|
||||||
import Control.Exception
|
import Control.Exception
|
||||||
import Control.Monad
|
import Control.Monad
|
||||||
import Control.Monad.Catch (MonadThrow)
|
import Control.Monad.Catch (MonadThrow, MonadCatch)
|
||||||
|
|
||||||
#if MIN_VERSION_mtl(2,2,0)
|
#if MIN_VERSION_mtl(2,2,0)
|
||||||
import Control.Monad.Except (MonadError(..))
|
import Control.Monad.Except (MonadError(..))
|
||||||
|
@ -176,6 +176,7 @@ newtype ClientM a = ClientM { runClientM' :: ReaderT ClientEnv (ExceptT ServantE
|
||||||
deriving ( Functor, Applicative, Monad, MonadIO, Generic
|
deriving ( Functor, Applicative, Monad, MonadIO, Generic
|
||||||
, MonadReader ClientEnv
|
, MonadReader ClientEnv
|
||||||
, MonadError ServantError
|
, MonadError ServantError
|
||||||
|
, MonadThrow, MonadCatch
|
||||||
)
|
)
|
||||||
|
|
||||||
runClientM :: ClientM a -> ClientEnv -> IO (Either ServantError a)
|
runClientM :: ClientM a -> ClientEnv -> IO (Either ServantError a)
|
||||||
|
|
Loading…
Reference in a new issue