Derive MonadMask for ClientM (#1572)

This commit is contained in:
Shea Levy 2022-03-26 12:03:01 -04:00 committed by GitHub
parent 65de6f701c
commit 658585a7cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,7 +24,7 @@ import Control.Monad
import Control.Monad.Base
(MonadBase (..))
import Control.Monad.Catch
(MonadCatch, MonadThrow)
(MonadCatch, MonadThrow, MonadMask)
import Control.Monad.Error.Class
(MonadError (..))
import Control.Monad.IO.Class
@ -136,7 +136,7 @@ newtype ClientM a = ClientM
{ unClientM :: ReaderT ClientEnv (ExceptT ClientError IO) a }
deriving ( Functor, Applicative, Monad, MonadIO, Generic
, MonadReader ClientEnv, MonadError ClientError, MonadThrow
, MonadCatch)
, MonadCatch, MonadMask)
instance MonadBase IO ClientM where
liftBase = ClientM . liftBase