| Maintainer | Bas van Dijk <v.dijk.bas@gmail.com> |
|---|
Foreign.Marshal.Utils.Region
Contents
Description
- 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)
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)
Arguments
| :: (ParentOf pr1 cr, ParentOf pr2 cr, MonadIO cr) | |
| => RegionalPtr α pr1 | Destination |
| -> RegionalPtr α pr2 | Source |
| -> Int | |
| -> cr () |
Arguments
| :: (ParentOf pr1 cr, ParentOf pr2 cr, MonadIO cr) | |
| => RegionalPtr α pr1 | Destination |
| -> RegionalPtr α pr2 | Source |
| -> Int | |
| -> cr () |