regional-pointers-0.2: Regional memory pointers

MaintainerBas van Dijk <v.dijk.bas@gmail.com>

Foreign.Ptr.Region.Unsafe

Description

Unsafe functions for retrieving the actual Ptr from a regional pointer and for lifting operations on Ptrs to RegionalPtrs.

These operations are unsafe because they allow you to free the regional pointer before exiting their region. So they enable you to perform IO with already freed pointers.

Documentation

unsafeWrap :: MonadIO m => (Ptr α -> IO β) -> RegionalPtr α r -> m βSource

unsafeWrap2 :: MonadIO m => (Ptr α -> γ -> IO β) -> RegionalPtr α r -> γ -> m βSource

unsafeWrap3 :: MonadIO m => (Ptr α -> γ -> δ -> IO β) -> RegionalPtr α r -> γ -> δ -> m βSource