-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Binary serialisation support for Quivers -- -- Handling for the binary library within Quivers @package quiver-binary @version 0.1.1.0 -- | This module provides functions for encoding/decoding values within a -- Quiver. -- -- For any I/O operations, use the functions provided by the -- quiver-bytestring package. module Control.Quiver.Binary -- | Encode all values. spput :: (Binary a) => SConsumer a PutM e -- | Decode all values. spget :: (Binary a) => SProducer a Get e -- | Decode all values from the provided stream of strict ByteStrings. Note -- that the error message does not return the ByteOffset from the -- Decoder as it will probably not match the actual location of -- the source ByteString. spdecode :: (Binary a, Monad m) => SP ByteString a m String -- | Decode all values from the provided stream of lazy ByteStrings. Note -- that the error message does not return the ByteOffset from the -- Decoder as it will probably not match the actual location of -- the source ByteString. spdecodeL :: (Binary a, Monad m) => SP ByteString a m String -- | Encode all values to a stream of strict ByteStrings. spencode :: (Binary a, Functor m) => SP a ByteString m () -- | Encode all values to a stream of lazy ByteStrings. spencodeL :: (Binary a) => SP a ByteString m () -- | The Binary class provides put and get, methods to -- encode and decode a Haskell value to a lazy ByteString. It -- mirrors the Read and Show classes for textual -- representation of Haskell types, and is suitable for serialising -- Haskell values to disk, over the network. -- -- For decoding and generating simple external binary formats (e.g. C -- structures), Binary may be used, but in general is not suitable for -- complex protocols. Instead use the Put and Get -- primitives directly. -- -- Instances of Binary should satisfy the following property: -- --
--   decode . encode == id
--   
-- -- That is, the get and put methods should be the inverse -- of each other. A range of instances are provided for basic Haskell -- types. class Binary t