regions-0.10: Provides the region monad for safely opening and working with scarce resources.

MaintainerBas van Dijk <>






Local regions

unsafeStripLocal :: RegionT (Local s) pr α -> RegionT s pr αSource

Convert a Local region to a regular region.

This function is unsafe because it allows you to use a LocalRegion-tagged handle outside its Local region.

MonadTransControl & MonadControlIO

unsafeLiftControl :: Monad pr => (Run (RegionT s) -> pr α) -> RegionT s pr αSource

unsafeControlIO :: MonadControlIO pr => (RunInBase (RegionT s pr) IO -> IO (RegionT s pr α)) -> RegionT s pr αSource

unsafeLiftIOOp :: MonadControlIO pr => ((α -> IO (RegionT s pr β)) -> IO (RegionT s pr γ)) -> (α -> RegionT s pr β) -> RegionT s pr γSource

unsafeLiftIOOp_ :: MonadControlIO pr => (IO (RegionT s pr α) -> IO (RegionT s pr β)) -> RegionT s pr α -> RegionT s pr βSource