Safe Haskell | None |
---|---|
Language | Haskell2010 |
Binary serialization of Haskell values
Synopsis
- class Monad m => PutMonad m where
- putWord8 :: Word8 -> m ()
- putWord16 :: Word16 -> m ()
- putWord32 :: Word32 -> m ()
- putWord64 :: Word64 -> m ()
- putWord8s :: [Word8] -> m ()
- putWord16s :: [Word16] -> m ()
- putWord32s :: [Word32] -> m ()
- putWord64s :: [Word64] -> m ()
- putBuffer :: BufferSize (Buffer Immutable pin gc heap) => Buffer Immutable pin gc heap -> m ()
- preAllocateAtLeast :: Word -> m ()
- putFloat32 :: PutMonad m => Float32 -> m ()
- putFloat32LE :: PutMonad m => Float32 -> m ()
- putFloat32BE :: PutMonad m => Float32 -> m ()
- putFloat64 :: PutMonad m => Float64 -> m ()
- putFloat64LE :: PutMonad m => Float64 -> m ()
- putFloat64BE :: PutMonad m => Float64 -> m ()
- putWord16BE :: PutMonad m => Word16 -> m ()
- putWord32BE :: PutMonad m => Word32 -> m ()
- putWord64BE :: PutMonad m => Word64 -> m ()
- putWord16LE :: PutMonad m => Word16 -> m ()
- putWord32LE :: PutMonad m => Word32 -> m ()
- putWord64LE :: PutMonad m => Word64 -> m ()
- putWord16BEs :: PutMonad m => [Word16] -> m ()
- putWord32BEs :: PutMonad m => [Word32] -> m ()
- putWord64BEs :: PutMonad m => [Word64] -> m ()
- putWord16LEs :: PutMonad m => [Word16] -> m ()
- putWord32LEs :: PutMonad m => [Word32] -> m ()
- putWord64LEs :: PutMonad m => [Word64] -> m ()
Documentation
class Monad m => PutMonad m where Source #
Monad which can build a sequence of bytes
putWord8 :: Word8 -> m () Source #
Write a Word8
putWord16 :: Word16 -> m () Source #
Write a Word16
putWord32 :: Word32 -> m () Source #
Write a Word32
putWord64 :: Word64 -> m () Source #
Write a Word64
putWord8s :: [Word8] -> m () Source #
Write some Word8
putWord16s :: [Word16] -> m () Source #
Write some Word16
putWord32s :: [Word32] -> m () Source #
Write some Word32
putWord64s :: [Word64] -> m () Source #
Write some Word64
putBuffer :: BufferSize (Buffer Immutable pin gc heap) => Buffer Immutable pin gc heap -> m () Source #
Write the contents of a buffer
preAllocateAtLeast :: Word -> m () Source #
Pre-allocate at least the given amount of bytes
This is a hint for the putter to speed up the allocation of memory
Instances
putFloat32 :: PutMonad m => Float32 -> m () Source #
Write a Float32 with host order
putFloat32LE :: PutMonad m => Float32 -> m () Source #
Write a Float32 with little-endian order
putFloat32BE :: PutMonad m => Float32 -> m () Source #
Write a Float32 with big-endian order
putFloat64 :: PutMonad m => Float64 -> m () Source #
Write a Float64 with host order
putFloat64LE :: PutMonad m => Float64 -> m () Source #
Write a Float64 with little-endian order
putFloat64BE :: PutMonad m => Float64 -> m () Source #
Write a Float64 with big-endian order
putWord16BE :: PutMonad m => Word16 -> m () Source #
Write a Word16 with big-endian order
putWord32BE :: PutMonad m => Word32 -> m () Source #
Write a Word32 with big-endian order
putWord64BE :: PutMonad m => Word64 -> m () Source #
Write a Word64 with big-endian order
putWord16LE :: PutMonad m => Word16 -> m () Source #
Write a Word16 with little-endian order
putWord32LE :: PutMonad m => Word32 -> m () Source #
Write a Word32 with little-endian order
putWord64LE :: PutMonad m => Word64 -> m () Source #
Write a Word64 with little-endian order
putWord16BEs :: PutMonad m => [Word16] -> m () Source #
Write some Word16 with big-endian order
putWord32BEs :: PutMonad m => [Word32] -> m () Source #
Write some Word32 with big-endian order
putWord64BEs :: PutMonad m => [Word64] -> m () Source #
Write some Word64 with big-endian order
putWord16LEs :: PutMonad m => [Word16] -> m () Source #
Write some Word16 with little-endian order
putWord32LEs :: PutMonad m => [Word32] -> m () Source #
Write some Word32 with little-endian order
putWord64LEs :: PutMonad m => [Word64] -> m () Source #
Write some Word64 with little-endian order