Stability | experimental |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A typeclass which abstracts over monads that can be "unlifted" back down to
STM
. (This is essentially a copy of Control.Monad.IO.Unlift, modified for
the STM
monad.)
In a manner that is analagous to MonadUnliftIO
, instances of this typeclass
are essentially limited to:
Synopsis
- class MonadSTM m => MonadUnliftSTM m where
- askUnliftSTM :: m (UnliftSTM m)
- withRunInSTM :: ((forall a. m a -> STM a) -> STM b) -> m b
- newtype UnliftSTM m = UnliftSTM {}
- askRunInSTM :: MonadUnliftSTM m => m (m a -> STM a)
- withUnliftSTM :: MonadUnliftSTM m => (UnliftSTM m -> STM a) -> m a
- toSTM :: MonadUnliftSTM m => m a -> m (STM a)
Documentation
class MonadSTM m => MonadUnliftSTM m where Source #
Analagous to MonadUnliftIO
. (It is an abstraction for monads that can
be "unlifted" back down to the STM
monad.)
askUnliftSTM :: m (UnliftSTM m) Source #
withRunInSTM :: ((forall a. m a -> STM a) -> STM b) -> m b Source #
Instances
MonadUnliftSTM STM Source # | |
Defined in Control.Monad.STM.Unlift | |
MonadUnliftSTM m => MonadUnliftSTM (ReaderT r m) Source # | |
Defined in Control.Monad.STM.Unlift | |
MonadUnliftSTM m => MonadUnliftSTM (IdentityT m) Source # | |
Defined in Control.Monad.STM.Unlift |
askRunInSTM :: MonadUnliftSTM m => m (m a -> STM a) Source #
Analagous to askRunInIO
withUnliftSTM :: MonadUnliftSTM m => (UnliftSTM m -> STM a) -> m a Source #
Analagous to withUnliftIO
toSTM :: MonadUnliftSTM m => m a -> m (STM a) Source #
Analagous to toIO