ptr-0.16.8.5: Experimental 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

Instances details
IsString Poking Source # 
Instance details

Defined in Ptr.Poking

Methods

fromString :: String -> Poking

Semigroup Poking Source # 
Instance details

Defined in Ptr.Poking

Methods

(<>) :: Poking -> Poking -> Poking

sconcat :: NonEmpty Poking -> Poking

stimes :: Integral b => b -> Poking -> Poking

Monoid Poking Source # 
Instance details

Defined in Ptr.Poking

null :: Poking -> Bool Source #

length :: Poking -> Int Source #

word8 :: Word8 -> Poking Source #

leWord16 :: Word16 -> Poking Source #

leWord32 :: Word32 -> Poking Source #

leWord64 :: Word64 -> Poking Source #

beWord16 :: Word16 -> Poking Source #

beWord32 :: Word32 -> Poking Source #

beWord64 :: Word64 -> Poking Source #

bytes :: ByteString -> Poking Source #

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

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

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

Unsigned ASCII integral

asciiPaddedAndTrimmedIntegral :: Integral a => Int -> a -> Poking Source #

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 #