Skip to content

Commit 1b88d8f

Browse files
committed
Add changelog entry
1 parent a74b49a commit 1b88d8f

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

changelog.d/issue-1829

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
synopsis: Add MonadCatch and MonadMask instances to RouteResultT and DelayedIO
2+
packages: servant-server
3+
prs: #1830
4+
issues: #1829

servant-server/src/Servant/Server/Internal/DelayedIO.hs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
module Servant.Server.Internal.DelayedIO where
66

77
import Control.Monad.Base (MonadBase (..))
8-
import Control.Monad.Catch (MonadThrow (..), MonadCatch(..), MonadMask)
8+
import Control.Monad.Catch (MonadCatch (..), MonadMask, MonadThrow (..))
99
import Control.Monad.Reader (MonadReader (..), ReaderT (..), runReaderT)
1010
import Control.Monad.Trans (MonadIO (..), MonadTrans (..))
1111
import Control.Monad.Trans.Control (MonadBaseControl (..))
@@ -30,12 +30,12 @@ newtype DelayedIO a = DelayedIO {runDelayedIO' :: ReaderT Request (ResourceT (Ro
3030
( Applicative
3131
, Functor
3232
, Monad
33+
, MonadCatch
3334
, MonadIO
35+
, MonadMask
3436
, MonadReader Request
3537
, MonadResource
3638
, MonadThrow
37-
, MonadCatch
38-
, MonadMask
3939
)
4040

4141
instance MonadBase IO DelayedIO where
@@ -55,7 +55,6 @@ instance MonadBaseControl IO DelayedIO where
5555
runInBase (runInternalState (runReaderT (runDelayedIO' x) req) s)
5656
restoreM = DelayedIO . lift . withInternalState . const . restoreM
5757

58-
5958
runDelayedIO :: DelayedIO a -> Request -> ResourceT IO (RouteResult a)
6059
runDelayedIO m req = transResourceT runRouteResultT $ runReaderT (runDelayedIO' m) req
6160

0 commit comments

Comments
 (0)