@@ -1,6 +1,17 @@
11module Reflex.Postpone.Class where
22
3+import Control.Monad.Trans.Control
4+import Control.Monad.Trans.Reader
5+import Control.Monad.Trans.Writer
6+
37class Monad m => MonadPostpone m where
48 -- | Postpone an action until all containing 'mfix'es can be expected to have
59 -- finished executing
610 postpone :: m a -> m a
11+
12+instance MonadPostpone m => MonadPostpone (ReaderT r m) where
13+ postpone = liftThrough postpone
14+
15+instance (MonadPostpone m, Monoid w) => MonadPostpone (WriterT w m) where
16+ postpone = liftThrough postpone
17+