regional-pointers-0.1.0.1: Regional memory pointersSource codeContentsIndex
Foreign.Marshal.Utils.Region
MaintainerBas van Dijk <v.dijk.bas@gmail.com>
Contents
General marshalling utilities
Combined allocation and marshalling
Marshalling of Boolean values (non-zero corresponds to True)
Marshalling of Maybe values
Marshalling lists of storable objects
Haskellish interface to memcpy and memmove
Description
Synopsis
with :: (Storable α, MonadCatchIO pr) => α -> (forall s. RegionalPtr α (RegionT s pr) -> RegionT s pr β) -> pr β
new :: (Storable α, MonadCatchIO pr) => α -> RegionT s pr (RegionalPtr α (RegionT s pr))
fromBool :: Num a => Bool -> a
toBool :: Num a => a -> Bool
copyBytes :: (ParentOf pr1 cr, ParentOf pr2 cr, MonadIO cr) => RegionalPtr α pr1 -> RegionalPtr α pr2 -> Int -> cr ()
moveBytes :: (ParentOf pr1 cr, ParentOf pr2 cr, MonadIO cr) => RegionalPtr α pr1 -> RegionalPtr α pr2 -> Int -> cr ()
General marshalling utilities
Combined allocation and marshalling
with :: (Storable α, MonadCatchIO pr) => α -> (forall s. RegionalPtr α (RegionT s pr) -> RegionT s pr β) -> pr βSource
new :: (Storable α, MonadCatchIO pr) => α -> RegionT s pr (RegionalPtr α (RegionT s pr))Source
Marshalling of Boolean values (non-zero corresponds to True)
fromBool :: Num a => Bool -> aSource
Convert a Haskell Bool to its numeric representation
toBool :: Num a => a -> BoolSource
Convert a Boolean in numeric representation to a Haskell value
Marshalling of Maybe values
TODO: Define and export: maybeNew, maybeWith and maybePeek.
Marshalling lists of storable objects
TODO: Define and export: withMany.
Haskellish interface to memcpy and memmove
(argument order: destination, source)
copyBytesSource
:: (ParentOf pr1 cr, ParentOf pr2 cr, MonadIO cr)
=> RegionalPtr α pr1Source
-> RegionalPtr α pr2
-> Int
-> cr ()
moveBytesSource
:: (ParentOf pr1 cr, ParentOf pr2 cr, MonadIO cr)
=> RegionalPtr α pr1Source
-> RegionalPtr α pr2
-> Int
-> cr ()
Produced by Haddock version 2.6.0