poke package:store-core

Poke actions are useful for building sequential serializers. They are actions which write values to bytes into memory specified by a Ptr base. The Applicative and Monad instances make it easy to write serializations, by keeping track of the Offset of the current byte. They allow you to chain Poke action such that subsequent Pokes write into subsequent portions of the output.
Throws a PokeException. These should be avoided when possible, they usually indicate a programming error.
Copy a section of memory, based on a ByteArray#, to the output. Note that this operation is unsafe, because the offset and length parameters are not checked.
Copy a section of memory, based on a ForeignPtr, to the output. Note that this operation is unsafe, the offset and length parameters are not checked.
Copy a section of memory, based on a Ptr, to the output. Note that this operation is unsafe, because the offset and length parameters are not checked.
A poke implementation based on an instance of Storable.
Exception thrown while running poke. Note that other types of exceptions could also be thrown. Invocations of fail in the Poke monad causes this exception to be thrown. PokeExceptions are not expected to occur in ordinary circumstances, and usually indicate a programming error.
Holds a pokeStatePtr, which is passed in to each Poke action. If the package is built with the 'force-alignment' flag, this also has a hidden Ptr field, which is used as scratch space during unaligned writes.
Run the Poke action, with the Ptr to the buffer where data is poked, and the current Offset. The result is the new offset, along with a return value. May throw a PokeException, though this should be avoided when possible. They usually indicate a programming error.
Make a PokeState from a buffer pointer. The first argument is a pointer to the memory to write to. The second argument is an IO action which is invoked if the store-core package was built with the force-alignment flag. The action should yield a pointer to scratch memory as large as maybeAlignmentBufferSize. Since 0.4.2