binary-state-0.1.1: Simple wrapper around Data.Binary, which adds StateT to Get/Put monads.

Data.BinaryState

Documentation

type PutState s a = StateT s PutM aSource

type GetState s a = StateT s Get aSource

putZ :: Binary a => a -> PutState s ()Source

encodeWith :: (a -> PutState s ()) -> s -> a -> ByteStringSource

encodeFile :: BinaryState s a => FilePath -> s -> a -> IO ()Source

decodeFile' :: BinaryState s a => FilePath -> s -> IO (a, s)Source