-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Encode and decode binary streams using the pipes and binary libraries. -- -- Encode and decode binary streams using the Pipes and -- binary libraries. -- -- See the NEWS file in the source distribution to learn about -- any important changes between version. @package pipes-binary @version 0.1.0.0 -- | This module exports facilities that allows you to encode and decode -- streams of Binary values using the pipes and -- pipes-parse libraries. module Control.Proxy.Binary -- | Decodes one Binary instance flowing downstream. -- -- decode :: (Proxy p, Monad m, Binary r) => EitherP DecodingError (StateP [ByteString] p) () (Maybe ByteString) y' y m r -- | Decodes Binary instances flowing downstream until end of input. -- -- decodeD :: (Proxy p, Monad m, Binary b) => () -> Pipe (EitherP DecodingError (StateP [ByteString] p)) (Maybe ByteString) b m () -- | Encodes the given Binary instance and sends it downstream in -- ByteString chunks. encode :: (Proxy p, Monad m, Binary x) => x -> p x' x () ByteString m () -- | Encodes Binary instances flowing downstream, each in possibly -- more than one ByteString chunk. encodeD :: (Proxy p, Monad m, Binary a) => () -> Pipe p a ByteString m r data DecodingError DecodingError :: ByteOffset -> String -> DecodingError -- | Number of bytes consumed before the error. peConsumed :: DecodingError -> ByteOffset -- | Error message. peMessage :: DecodingError -> String