poke -package:valor
Write the given value to the given memory location. Alignment
restrictions might apply; see
peek.
Serializes a value to bytes. It is the responsibility of the caller to
ensure that at least the number of bytes required by
size are
available. These details are handled by
encode and similar
utilities.
Serializes a value to bytes. It is the responsibility of the caller to
ensure that at least the number of bytes required by
size are
available. These details are handled by
encode and similar
utilities.
Write a
Vector to a contiguous piece of memory.
Unbox a Haskell type and append the resulting bytes to a mutable byte
array. The array is grown exponentially when more space is needed.
Like
snoc except that the value is unboxed to the byte array.
Note: If you are serializing a large number of small fields, and the
types are statically known, then it may be more efficient to declare a
record of those fields and derive an
Unbox instance of the
entire record.
Not on Stackage, so not searched.
Discord verification bot
Changing a sequence of bytes starting from the given pointer.
Pokes are the most primitive buffer manipulation. In most
cases, you don't use the explicitly but as part of a
Write,
which also tells how many bytes will be changed at most.
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.
Specification of a sized and errorless writing action to a pointer.
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.
Abstraction over an IO action, which takes a pointer, populates it and
produces a pointer right after the populated data.