-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | data serialization/deserialization io-streams library
--
@package binary-streams
@version 0.1.0.0
module System.IO.Streams.Binary
-- | Read an instance of Binary from an InputStream, throwing
-- a DecodeException if the decoding fails.
--
-- binaryFromStream consumes only as much input as necessary: any
-- unconsumed input is pushed back onto the InputStream.
binaryFromStream :: Binary a => InputStream ByteString -> IO (Maybe a)
-- | Transform an InputStream over byte strings to an
-- InputStream yielding values of type a, throwing a
-- DecodeException if the decoding fails.
binaryInputStream :: Binary a => InputStream ByteString -> IO (InputStream a)
-- | Write an instance of Binary to an InputStream.
binaryToStream :: Binary a => OutputStream ByteString -> Maybe a -> IO ()
-- | Transform an OutputStream accepting byte strings to an
-- OutputStream accepting values of type a.
binaryOutputStream :: Binary a => OutputStream ByteString -> IO (OutputStream a)
-- | An Exception raised when decoding fails.
data DecodeException
DecodeException :: ByteOffset -> String -> DecodeException
instance Typeable DecodeException
instance Exception DecodeException
instance Show DecodeException