haskus-binary-1.5: Haskus binary format manipulation

Safe HaskellNone
LanguageHaskell2010

Haskus.Binary.Serialize.Put

Description

Binary serialization of Haskell values

Synopsis

Documentation

class Monad m => PutMonad m where Source #

Monad which can build a sequence of bytes

Minimal complete definition

putWord8, putWord16, putWord32, putWord64, putBuffer

Methods

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
PutMonad GetSize Source # 
Instance details

Defined in Haskus.Binary.Serialize.Size

MonadIO m => PutMonad (BufferPutT (Buffer Mutable pin gc heap) m) Source # 
Instance details

Defined in Haskus.Binary.Serialize.Buffer

Methods

putWord8 :: Word8 -> BufferPutT (Buffer Mutable pin gc heap) m () Source #

putWord16 :: Word16 -> BufferPutT (Buffer Mutable pin gc heap) m () Source #

putWord32 :: Word32 -> BufferPutT (Buffer Mutable pin gc heap) m () Source #

putWord64 :: Word64 -> BufferPutT (Buffer Mutable pin gc heap) m () Source #

putWord8s :: [Word8] -> BufferPutT (Buffer Mutable pin gc heap) m () Source #

putWord16s :: [Word16] -> BufferPutT (Buffer Mutable pin gc heap) m () Source #

putWord32s :: [Word32] -> BufferPutT (Buffer Mutable pin gc heap) m () Source #

putWord64s :: [Word64] -> BufferPutT (Buffer Mutable pin gc heap) m () Source #

putBuffer :: BufferSize (Buffer Immutable pin0 gc0 heap0) => Buffer Immutable pin0 gc0 heap0 -> BufferPutT (Buffer Mutable pin gc heap) m () Source #

preAllocateAtLeast :: Word -> BufferPutT (Buffer Mutable pin gc heap) m () Source #

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