ptr-0.16.2: Abstractions for operations on pointers

Safe HaskellNone
LanguageHaskell2010

Ptr.Poking

Synopsis

Documentation

data Poking Source #

An efficiently composable unmaterialised specification of how to populate a pointer.

Once composed it can be materialized into a specific data-structure like ByteString or to directly populate a pointer in some low-level API.

Constructors

Poking !Int !(Ptr Word8 -> IO ())
  • Amount of bytes the encoded data will occupy.
  • Exception-free action, which populates the pointer to the encoded data.

poke :: Poke input -> input -> Poking Source #

pokeAndPeek :: PokeAndPeek input output -> input -> Poking Source #

list :: (element -> Poking) -> [element] -> Poking Source #