regional-pointers-0.1.0.1: Regional memory pointersSource codeContentsIndex
Foreign.Ptr.Region
MaintainerBas van Dijk <v.dijk.bas@gmail.com>
Contents
Memory as a scarce resource
Pure functions on regional pointers
Description
Synopsis
newtype Memory α = Memory {
size :: Int
}
type RegionalPtr α r = RegionalHandle (Memory α) r
module Control.Monad.Trans.Region
mapRegionalPtr :: (Ptr α -> Ptr β) -> RegionalPtr α r -> RegionalPtr β r
castPtr :: RegionalPtr α r -> RegionalPtr β r
plusPtr :: RegionalPtr α r -> Int -> RegionalPtr β r
alignPtr :: RegionalPtr α r -> Int -> RegionalPtr α r
minusPtr :: RegionalPtr α r -> RegionalPtr β r -> Int
Memory as a scarce resource
newtype Memory α Source
Represents memory of size number of bytes which may be marshalled to or from Haskell values of type α. Before you can use the memory you have to allocate it using open.
Constructors
Memory
size :: Int
show/hide Instances
type RegionalPtr α r = RegionalHandle (Memory α) rSource
Handy type synonym for a regional handle to memory. This should provide a safer replacement for Foreign.Ptr.Ptr

Note that this module re-exports the Control.Monad.Trans.Region module from the regions package which allows you to:

module Control.Monad.Trans.Region
Pure functions on regional pointers
mapRegionalPtr :: (Ptr α -> Ptr β) -> RegionalPtr α r -> RegionalPtr β rSource
castPtr :: RegionalPtr α r -> RegionalPtr β rSource
Wraps: Foreign.Ptr.castPtr
plusPtr :: RegionalPtr α r -> Int -> RegionalPtr β rSource
Wraps: Foreign.Ptr.plusPtr
alignPtr :: RegionalPtr α r -> Int -> RegionalPtr α rSource
Wraps: Foreign.Ptr.alignPtr
minusPtr :: RegionalPtr α r -> RegionalPtr β r -> IntSource
Wraps: Foreign.Ptr.minusPtr
Produced by Haddock version 2.6.0