Safe Haskell | Safe-Inferred |
---|
- newtype FinalizerT m a = FinalizerT {
- unFinalizerT :: forall r. (a -> m r) -> (IO () -> r -> m r) -> m r
- finalizer :: Monad m => IO () -> FinalizerT m ()
- runFinalizerT :: Monad m => FinalizerT m a -> m (a, IO ())
- execFinalizerT :: MonadIO m => FinalizerT m a -> m a
- mapFinalizerT :: (Monad m, Monad n) => (forall x. m x -> n x) -> FinalizerT m a -> FinalizerT n a
Documentation
newtype FinalizerT m a Source
An action with explicit releasing action.
FinalizerT | |
|
MonadTrans FinalizerT | |
Monad (FinalizerT m) | |
Functor (FinalizerT m) | |
Applicative (FinalizerT m) | |
MonadIO m => MonadIO (FinalizerT m) | |
FromFinalizer (FinalizerT IO) |
finalizer :: Monad m => IO () -> FinalizerT m ()Source
Add a finalizer.
runFinalizerT :: Monad m => FinalizerT m a -> m (a, IO ())Source
Run the action and run all associated finalizers.
execFinalizerT :: MonadIO m => FinalizerT m a -> m aSource
mapFinalizerT :: (Monad m, Monad n) => (forall x. m x -> n x) -> FinalizerT m a -> FinalizerT n aSource