ϊΞΑΟΊwG      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEF#Bas van Dijk <v.dijk.bas@gmail.com>IA regional handle to memory. This should provide a safer replacement for   Foreign.Ptr.G HHHH#Bas van Dijk <v.dijk.bas@gmail.com>#Bas van Dijk <v.dijk.bas@gmail.com> :Construct a regional pointer from a native pointer and an IO computation A that frees the pointer which is executed when the region exits.  The constant nullPtr# contains a distinguished value of  6 that is not associated with a valid memory location.  Note that nullPtr5 is a pure value. This means it does not perform the  side-effect of registering a I like  free nullPtr in the  J monad. Apply a pure6 function to the inner pointer of a regional pointer. The castPtr4 function casts a pointer from one type to another. Wraps:  Foreign.Ptr.K 9Advances the given address by the given offset in bytes. Wraps:  Foreign.Ptr.L 8Given an arbitrary address and an alignment constraint, alignPtr yields N the next higher address that fulfills the alignment constraint. An alignment  constraint x* is fulfilled by any address divisible by x. This operation  is idempotent. Wraps:  Foreign.Ptr.M AComputes the offset required to get from the second to the first  argument. We have  ' p2 == p1 `plusPtr` (p2 `minusPtr` p1) Wraps:  Foreign.Ptr.N OPQRSTUJVWX   #Bas van Dijk <v.dijk.bas@gmail.com>IConvenience function which allocates sufficient memory to hold values of type ±D, applies the given continuation function to the resulting regional 'pointer and runs the resulting region. -This should provide a safer replacement for: Foreign.Marshal.Alloc.Y.  Note that:  alloca =  $ Z (undefined :: ±) LConvenience function which allocates the given number of bytes, applies the Kgiven continuation function to the resulting regional pointer and runs the resulting region. -This should provide a safer replacement for: Foreign.Marshal.Alloc.[.  Note that: allocaBytes size f = U $  size >>= f IConvenience function which allocates sufficient memory to hold values of type ±) and returns a regional pointer to them. -This should provide a safer replacement for: Foreign.Marshal.Alloc.\.  Note that:  malloc =  $ Z (undefined :: ±) LAllocates the given number of bytes and returns a regional pointer to them. -This should provide a safer replacement for: Foreign.Marshal.Alloc.]. #Bas van Dijk <v.dijk.bas@gmail.com>KRead a value from a memory area regarded as an array of values of the same K kind. The first argument specifies the start address of the array and the K second the index into the array (the first element of the array has index  0!). The following equality holds,  2 peekElemOff addr idx = IOExts.fixIO $ \result -> / peek (addr `plusPtr` (idx * sizeOf result)) ENote that this is only a specification, not necessarily the concrete ! implementation of the function. Wraps: Foreign.Storable.^. JWrite a value to a memory area regarded as an array of values of the same & kind. The following equality holds:   pokeElemOff addr idx x = , poke (addr `plusPtr` (idx * sizeOf x)) x Wraps: Foreign.Storable._. HRead a value from a memory location given by a base address and offset.  The following equality holds:  2 peekByteOff addr off = peek (addr `plusPtr` off) Wraps: Foreign.Storable.`. LWrite a value to a memory location given by a base address and offset. The  following equality holds:  6 pokeByteOff addr off x = poke (addr `plusPtr` off) x Wraps: Foreign.Storable.a. -Read a value from the given memory location. ENote that the peek and poke functions might require properly aligned I addresses to function correctly. This is architecture dependent; thus, M portable code should ensure that when peeking or poking values of some type  a, the alignment constraint for a, as given by the function  alignment  is fulfilled. Wraps: Foreign.Storable.b. LWrite the given value to the given memory location. Alignment restrictions  might apply; see . Wraps: Foreign.Storable.c. #Bas van Dijk <v.dijk.bas@gmail.com> val f executes the computation f!, passing as argument a regional ? pointer to a temporarily allocated block of memory into which val has been  marshalled (the combination of  and ). The memory is freed when f' terminates (either normally or via an  exception). &This provides a safer replacement for Foreign.Marshal.Utils.d. KAllocate a block of memory and marshal a value into it (the combination of   and 8). The size of the area allocated is determined by the  Z method from the instance of e for the appropriate type. &This provides a safer replacement for Foreign.Marshal.Utils.f. HCopies the given number of bytes from the second area (source) into the + first (destination); the copied areas may not overlap Wraps: Foreign.Marshal.Utils.g.  Destination Source Number of bytes to copy HCopies the given number of bytes from the second area (source) into the ' first (destination); the copied areas may overlap Wraps: Foreign.Marshal.Utils.h.  Destination Source Number of bytes to move #Bas van Dijk <v.dijk.bas@gmail.com>FAllocate storage for the given number of elements of a storable type. Like , but for multiple elements. Like :, but add an extra position to hold a special termination  element. BTemporarily allocate space for the given number of elements (like ,  but for multiple elements). !Like  :, but add an extra position to hold a special termination  element. i"6Convert an array of given length into a Haskell list. M(This version traverses the array backwards using an accumulating parameter, = which uses constant stack space. The previous version using mapM needed  linear stack space.) Wraps: Foreign.Marshal.Array.j. #IConvert an array terminated by the given end marker into a Haskell list. Wraps: Foreign.Marshal.Array.k. $1Write the list elements consecutive into memory. Wraps: Foreign.Marshal.Array.l. %LWrite the list elements consecutive into memory and terminate them with the  given marker element. Wraps: Foreign.Marshal.Array.m. &FWrite a list of storable elements into a newly allocated, consecutive  sequence of storable values. Like , but for multiple elements. 'FWrite a list of storable elements into a newly allocated, consecutive N sequence of storable values, where the end is fixed by the given end marker. (7Temporarily store a list of storable values in memory. Like , but for multiple elements. )Like (3, but a terminator indicates where the array ends. *Like (<, but the action gets the number of values as an additional  parameter. +Like *3, but a terminator indicates where the array ends. ,JCopy the given number of elements from the second array (source) into the 1 first array (destination); the copied areas may not overlap. Wraps: Foreign.Marshal.Array.n.  Destination Source  Number of elements to copy. -JCopy the given number of elements from the second array (source) into the - first array (destination); the copied areas may overlap. Wraps: Foreign.Marshal.Array.o.  Destination Source  Number of elements to move. .EReturn the number of elements in an array, excluding the terminator. Wraps: Foreign.Marshal.Array.p. /AAdvance a pointer into an array by the given number of elements. Wraps: Foreign.Marshal.Array.q.  !"#$%&'()*+,-./ !"#$%&'()*+,-./ !"#$%&'()*+,-./#Bas van Dijk <v.dijk.bas@gmail.com>0KHandy type synonym for a regional pointer to an array of C wide characters N which is paired with the length of the array instead of terminated by a NUL. < (Thus allowing NUL characters in the middle of the string) ,This should provide a safer replacement for Foreign.C.String.r. 1KHandy type synonym for a regional pointer to an array of C wide characters  terminated by a NUL. ,This should provide a safer replacement for Foreign.C.String.s. 2LHandy type synonym for a regional pointer to an array of C characters which H is paired with the length of the array instead of terminated by a NUL. < (Thus allowing NUL characters in the middle of the string) ,This should provide a safer replacement for Foreign.C.String.t. 3FHandy type synonym for a regional pointer to an array of C characters  terminated by a NUL. ,This should provide a safer replacement for Foreign.C.String.u. 49Marshal a NUL terminated C string into a Haskell string. Wraps: Foreign.C.String.v 5?Marshal a C string with explicit length into a Haskell string. Wraps: Foreign.C.String.w. 69Marshal a Haskell string into a NUL terminated C string. The Haskell string may not contain any NUL characters Wraps: Foreign.C.String.x. 7DMarshal a Haskell string into a C string (ie, character array) with  explicit length information. Wraps: Foreign.C.String.y. 8HMarshal a Haskell string into a NUL terminated C string using temporary  storage.  the Haskell string may not contain any NUL characters L the memory is freed when the subcomputation terminates (either normally or  via an exception). Wraps: Foreign.C.String.z. 9LMarshal a Haskell string into a C string (ie, character array) in temporary , storage, with explicit length information. L the memory is freed when the subcomputation terminates (either normally or  via an exception). Wraps: Foreign.C.String.{. : Generalizes Foreign.C.String.| to any  }. ;9Marshal a NUL terminated C string into a Haskell string. Wraps: Foreign.C.String.~. <?Marshal a C string with explicit length into a Haskell string. Wraps: Foreign.C.String.. =9Marshal a Haskell string into a NUL terminated C string. The Haskell string may not contain any NUL characters Wraps: Foreign.C.String.€. >DMarshal a Haskell string into a C string (ie, character array) with  explicit length information. Wraps: Foreign.C.String.. ?HMarshal a Haskell string into a NUL terminated C string using temporary  storage.  the Haskell string may not contain any NUL characters L the memory is freed when the subcomputation terminates (either normally or  via an exception). Wraps: Foreign.C.String.‚. @LMarshal a Haskell string into a C string (ie, character array) in temporary , storage, with explicit length information. L the memory is freed when the subcomputation terminates (either normally or  via an exception). Wraps: Foreign.C.String.ƒ. A>Marshal a NUL terminated C wide string into a Haskell string. Wraps: Foreign.C.String.„. BDMarshal a C wide string with explicit length into a Haskell string. Wraps: Foreign.C.String.…. C>Marshal a Haskell string into a NUL terminated C wide string. The Haskell string may not contain any NUL characters. Wraps: Foreign.C.String.†. DIMarshal a Haskell string into a C wide string (ie, wide character array) # with explicit length information. Wraps: Foreign.C.String.‡. ECMarshal a Haskell string into a NUL terminated C wide string using  temporary storage.  the Haskell string may not contain any NUL characters @ the memory is freed when the subcomputation terminates (either " normally or via an exception). Wraps: Foreign.C.String.ˆ. FCMarshal a Haskell string into a NUL terminated C wide string using  temporary storage.  the Haskell string may not contain any NUL characters. @ the memory is freed when the subcomputation terminates (either " normally or via an exception). Wraps: Foreign.C.String.‰. Š‹ŒLallocate an array to hold the list and pair it with the number of elements. Ž0123456789:;<=>?@ABCDEF32456789:;<=>?@10ABCDEF0123456789:;<=>?@ABCDEF   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQR STUVWUVX S S S SUYZUV[UV\UV]UV^UV_UV`UVaUVbUVc d ef d d d e e! e" e# e$ e% & eg ' ( )h i. i/ i0 i1 i8 i9 i: i; j k l m @ A B C D E Fnop G H I J K L M N O P Q Rqrstuvwregional-pointers-0.3Foreign.C.String.RegionForeign.Marshal.Utils.RegionForeign.Ptr.RegionForeign.Ptr.Region.UnsafeForeign.Marshal.Alloc.RegionForeign.Storable.RegionForeign.Marshal.Array.RegionForeign.Ptr.Region.InternalbaseForeign.C.StringcastCharToCCharcastCCharToCharForeign.Marshal.UtilstoBoolfromBool RegionalPtr unsafePtr unsafeWrap unsafeWrap2 unsafeWrap3 regionalPtrnullPtrmapRegionalPtrcastPtrplusPtralignPtrminusPtralloca allocaBytesmalloc mallocBytes peekElemOff pokeElemOff peekByteOff pokeByteOffpeekpokewithnew copyBytes moveBytes mallocArray mallocArray0 allocaArray allocaArray0 peekArray peekArray0 pokeArray pokeArray0newArray newArray0 withArray withArray0 withArrayLen withArrayLen0 copyArray moveArray lengthArray0 advancePtrRegionalCWStringLenRegionalCWStringRegionalCStringLenRegionalCString peekCStringpeekCStringLen newCString newCStringLen withCStringwithCStringLencharIsRepresentable peekCAStringpeekCAStringLen newCAStringnewCAStringLen withCAStringwithCAStringLen peekCWStringpeekCWStringLen newCWStringnewCWStringLen withCWStringwithCWStringLenGHC.PtrPtrregions-0.6.0.1#Control.Monad.Trans.Region.Internal CloseActionRegionT#Control.Monad.Trans.Region.ParentOfParentOf liftCatch mapRegionT liftCallCC forkTopRegion runTopRegion runRegionT TopRegiondupDupForeign.Marshal.AllocForeign.StorablesizeOfStorableunsafeWrap2flpForeign.Marshal.Array CWStringLenCWString CStringLenCStringtransformers-0.2.1.0Control.Monad.IO.ClassMonadIOnULwNUL newArrayLen charsToCCharscharsToCWcharscastCharToCWchar