úÎ. -!  experimental tomi@nomi.cz $Monoid under least common multiple. GThe Offset monad acts like a Reader for the pointer element and like a J State for the offset element. It is used to provide the syntactic sugar  for instances. JThe member functions of this class facilitate writing values of arbitrary H (including recursive) data types to raw memory and reading values from E blocks of raw memory. The class, furthermore, includes support for K computing the storage requirements and alignment restrictions of storable  types. LThis class fills the gap between Foreign.Storable and Data.Binary. It adds L support for marshalling (finite) values of variable-sized data types, like L lists or trees, while preserving the performance and memory efficiency one J expects from the Storable class. It also provides a (monadic) syntactic E sugar that takes care of alignment restrictions by itself and makes  instance deriving easy. JThe primary aim of this class, as opposed to Foreign.Storable, is storing K values to raw memory for the purpose of sending them over a network (in a L homogeneous distributed environment, no endianness translation is done) or G dumping them to external storage. It was not intended to be used for  marshalling structures to/,from C, although it may be used for that --  you'Fll need, however, specially crafted instances for compound data types H that apply alignment restrictions recursively, not only for elementary 2 Storable values. These may be provided someday. The API used for writing/"reading values is provided by the ,  ,  and # functions (V standing for value). 5For help on deriving instances see the source of the ; Data.Storable.Instances module. For help on usage of the  type, which L represents raw memory addresses, see the documentation of Foreign Function  Interface (FFI). Minimal complete definition: , ,  and . >Computes the storage requirements (in bytes) of the argument. & The value of the argument _is_ used. AComputes the alignment constraint of the argument. An alignment  constraint x* is fulfilled by any address divisible by x. * The value of the argument _is_not_ used. -Read a value from the given memory location. GNote that the peekV and pokeV functions might require properly aligned J addresses to function correctly. This is architecture dependent; thus, I portable code should ensure that when peeking or poking values of some  type a, the alignment constraint for a, as given by the function   is fulfilled. ?Write the given value to the given memory location. Alignment  restrictions might apply; see . ERun the offset monad on a given pointer, yielding a value out of it. 9Align a given offset using a given alignment constraint. %Pad a given offset range with zeros.          storable-0.1 Data.StorableData.Storable.Instances StorableMsizeOfM alignmentMpeekMpokeMsizeOfV alignmentVpeekVpokeVLCMgetLCMOffset AlignmentSizeOfbaseGHC.PtrPtr runOffsetalignzeroPad