Hoogle Search
Within LTS Haskell 22.20 (ghc-9.6.4)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
-
resourcet Control.Monad.Trans.Resource Perform asynchronous exception masking. This is more general then Control.Exception.mask, yet more efficient than Control.Exception.Lifted.mask. Since 0.3.0
class MonadIO m =>
MonadResource mresourcet Control.Monad.Trans.Resource A Monad which allows for safe resource allocation. In theory, any monad transformer stack which includes a ResourceT can be an instance of MonadResource. Note: runResourceT has a requirement for a MonadUnliftIO m monad, which allows control operations to be lifted. A MonadResource does not have this requirement. This means that transformers such as ContT can be an instance of MonadResource. However, the ContT wrapper will need to be unwrapped before calling runResourceT. Since 0.3.0
type
MonadResourceBase = MonadUnliftIOresourcet Control.Monad.Trans.Resource Deprecated: Use MonadUnliftIO directly instead
joinResourceT :: ResourceT (ResourceT m) a -> ResourceT m aresourcet Control.Monad.Trans.Resource This function mirrors join at the transformer level: it will collapse two levels of ResourceT into a single ResourceT. Since 0.4.6
liftResourceT :: MonadResource m => ResourceT IO a -> m aresourcet Control.Monad.Trans.Resource Lift a ResourceT IO action into the current Monad. Since 0.4.0
runResourceT :: MonadUnliftIO m => ResourceT m a -> m aresourcet Control.Monad.Trans.Resource Unwrap a ResourceT transformer, and call all registered release actions. Note that there is some reference counting involved due to resourceForkIO. If multiple threads are sharing the same collection of resources, only the last call to runResourceT will deallocate the resources. NOTE Since version 1.2.0, this function will throw a ResourceCleanupException if any of the cleanup functions throw an exception.
runResourceTChecked :: MonadUnliftIO m => ResourceT m a -> m aresourcet Control.Monad.Trans.Resource Backwards compatible alias for runResourceT.
transResourceT :: (m a -> n b) -> ResourceT m a -> ResourceT n bresourcet Control.Monad.Trans.Resource Transform the monad a ResourceT lives in. This is most often used to strip or add new transformers to a stack, e.g. to run a ReaderT. Note that this function is a slight generalization of hoist. Since 0.3.0
class MonadIO m =>
MonadResource mresourcet Control.Monad.Trans.Resource.Internal A Monad which allows for safe resource allocation. In theory, any monad transformer stack which includes a ResourceT can be an instance of MonadResource. Note: runResourceT has a requirement for a MonadUnliftIO m monad, which allows control operations to be lifted. A MonadResource does not have this requirement. This means that transformers such as ContT can be an instance of MonadResource. However, the ContT wrapper will need to be unwrapped before calling runResourceT. Since 0.3.0
liftResourceT :: MonadResource m => ResourceT IO a -> m aresourcet Control.Monad.Trans.Resource.Internal Lift a ResourceT IO action into the current Monad. Since 0.4.0