@@ -60,6 +60,11 @@ instance MonadMask m => MonadMask (ExceptT e m) where
6060 -> ExceptT e m a -> ExceptT e m a
6161 q u (ExceptT b) = ExceptT (u b)
6262
63+ getMaskingState = lift getMaskingState
64+ interruptible = ExceptT . interruptible . runExceptT
65+ allowInterrupt = lift allowInterrupt
66+
67+
6368--
6469-- Lazy.WriterT instances
6570--
@@ -104,6 +109,11 @@ instance (Monoid w, MonadMask m) => MonadMask (Lazy.WriterT w m) where
104109 -> Lazy. WriterT w m a -> Lazy. WriterT w m a
105110 q u (Lazy. WriterT b) = Lazy. WriterT (u b)
106111
112+ getMaskingState = lift getMaskingState
113+ interruptible = Lazy. WriterT . interruptible . Lazy. runWriterT
114+ allowInterrupt = lift allowInterrupt
115+
116+
107117--
108118-- Strict.WriterT instances
109119--
@@ -147,6 +157,10 @@ instance (Monoid w, MonadMask m) => MonadMask (Strict.WriterT w m) where
147157 -> Strict. WriterT w m a -> Strict. WriterT w m a
148158 q u (Strict. WriterT b) = Strict. WriterT (u b)
149159
160+ getMaskingState = lift getMaskingState
161+ interruptible = Strict. WriterT . interruptible . Strict. runWriterT
162+ allowInterrupt = lift allowInterrupt
163+
150164
151165--
152166-- Lazy.RWST Instances
@@ -193,6 +207,10 @@ instance (Monoid w, MonadMask m) => MonadMask (Lazy.RWST r w s m) where
193207 -> Lazy. RWST r w s m a -> Lazy. RWST r w s m a
194208 q u (Lazy. RWST b) = Lazy. RWST $ \ r s -> u (b r s)
195209
210+ getMaskingState = lift getMaskingState
211+ interruptible f = Lazy. RWST $ \ r s -> interruptible (Lazy. runRWST f r s)
212+ allowInterrupt = lift allowInterrupt
213+
196214
197215--
198216-- Strict.RWST Instances
@@ -239,6 +257,10 @@ instance (Monoid w, MonadMask m) => MonadMask (Strict.RWST r w s m) where
239257 -> Strict. RWST r w s m a -> Strict. RWST r w s m a
240258 q u (Strict. RWST b) = Strict. RWST $ \ r s -> u (b r s)
241259
260+ getMaskingState = lift getMaskingState
261+ interruptible f = Strict. RWST $ \ r s -> interruptible (Strict. runRWST f r s)
262+ allowInterrupt = lift allowInterrupt
263+
242264
243265--
244266-- Lazy.StateT instances
@@ -283,6 +305,10 @@ instance MonadMask m => MonadMask (Lazy.StateT s m) where
283305 -> Lazy. StateT s m a -> Lazy. StateT s m a
284306 q u (Lazy. StateT b) = Lazy. StateT $ \ s -> u (b s)
285307
308+ getMaskingState = lift getMaskingState
309+ interruptible f = Lazy. StateT $ \ s -> interruptible (Lazy. runStateT f s)
310+ allowInterrupt = lift allowInterrupt
311+
286312
287313--
288314-- Strict.StateT instances
@@ -327,3 +353,7 @@ instance MonadMask m => MonadMask (Strict.StateT s m) where
327353 -> Strict. StateT s m a -> Strict. StateT s m a
328354 q u (Strict. StateT b) = Strict. StateT $ \ s -> u (b s)
329355
356+
357+ getMaskingState = lift getMaskingState
358+ interruptible f = Strict. StateT $ \ s -> interruptible (Strict. runStateT f s)
359+ allowInterrupt = lift allowInterrupt
0 commit comments