ptr-0.16.6.1: 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.
Instances
IsString Poking Source # 
Instance details

Defined in Ptr.Poking

Methods

fromString :: String -> Poking #

Semigroup Poking Source # 
Instance details

Defined in Ptr.Poking

Monoid Poking Source # 
Instance details

Defined in Ptr.Poking

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

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

asciiIntegral :: Integral a => a -> Poking Source #

Unsigned ASCII integral

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

vector :: Vector vector element => (element -> Poking) -> vector element -> Poking Source #

intercalateVector :: Vector vector element => (element -> Poking) -> Poking -> vector element -> Poking Source #