From 658585a7cd2191d1387786d236b8b64cd4a13cb6 Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Sat, 26 Mar 2022 12:03:01 -0400 Subject: [PATCH] Derive MonadMask for ClientM (#1572) --- servant-client/src/Servant/Client/Internal/HttpClient.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servant-client/src/Servant/Client/Internal/HttpClient.hs b/servant-client/src/Servant/Client/Internal/HttpClient.hs index 71f5c7748..42fecfb75 100644 --- a/servant-client/src/Servant/Client/Internal/HttpClient.hs +++ b/servant-client/src/Servant/Client/Internal/HttpClient.hs @@ -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