Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Poke = Poke {}
- concat :: Foldable f => f Poke -> Poke
- byteString :: ByteString -> Poke
- word8 :: Word8 -> Poke
- lWord16 :: Word16 -> Poke
- bWord16 :: Word16 -> Poke
- lWord32 :: Word32 -> Poke
- bWord32 :: Word32 -> Poke
- lWord64 :: Word64 -> Poke
- bWord64 :: Word64 -> Poke
- lInt16 :: Int16 -> Poke
- bInt16 :: Int16 -> Poke
- lInt32 :: Int32 -> Poke
- bInt32 :: Int32 -> Poke
- lInt64 :: Int64 -> Poke
- bInt64 :: Int64 -> Poke
- textUtf8 :: Text -> Poke
- int8AsciiDec :: Int8 -> Poke
- int16AsciiDec :: Int16 -> Poke
- int32AsciiDec :: Int32 -> Poke
- int64AsciiDec :: Int64 -> Poke
- intAsciiDec :: Int -> Poke
- word8AsciiDec :: Word8 -> Poke
- word16AsciiDec :: Word16 -> Poke
- word32AsciiDec :: Word32 -> Poke
- word64AsciiDec :: Word64 -> Poke
- wordAsciiDec :: Word -> Poke
- doubleAsciiDec :: Double -> Poke
- sizedReverse :: Int -> (Ptr Word8 -> IO a) -> Poke
Documentation
Abstraction over an IO action, which takes a pointer, populates it and produces a pointer right after the populated data.
byteString :: ByteString -> Poke Source #
Efficiently copy the contents of ByteString using memcpy
.
ASCII integers
int8AsciiDec :: Int8 -> Poke Source #
Encode Int8 as a signed ASCII decimal.
int16AsciiDec :: Int16 -> Poke Source #
Encode Int16 as a signed ASCII decimal.
int32AsciiDec :: Int32 -> Poke Source #
Encode Int32 as a signed ASCII decimal.
int64AsciiDec :: Int64 -> Poke Source #
Encode Int64 as a signed ASCII decimal.
intAsciiDec :: Int -> Poke Source #
Encode Int as a signed ASCII decimal.
word8AsciiDec :: Word8 -> Poke Source #
Encode Word8 as an unsigned ASCII decimal.
word16AsciiDec :: Word16 -> Poke Source #
Encode Word16 as an unsigned ASCII decimal.
word32AsciiDec :: Word32 -> Poke Source #
Encode Word32 as an unsigned ASCII decimal.
word64AsciiDec :: Word64 -> Poke Source #
Encode Word64 as an unsigned ASCII decimal.
wordAsciiDec :: Word -> Poke Source #
Encode Word as an unsigned ASCII decimal.
doubleAsciiDec :: Double -> Poke Source #
Encode Double as a signed ASCII decimal.
Low level
sizedReverse :: Int -> (Ptr Word8 -> IO a) -> Poke Source #
Having the amount of bytes to be written precomputed, executes an action, which fills the pointer going downward, starting from the pointer that follows the chunk. I.e., you have to decrement the pointer before writing the first byte, decrement it again before writing the second byte and so on.