Safe Haskell | Safe-Inferred |
---|
Binary serializing with sharing
- class (Typeable alpha, Ord alpha, Eq alpha, Show alpha) => BinaryShared alpha where
- encodeFileSer :: BinaryShared a => FilePath -> a -> IO ()
- encodeSer :: BinaryShared a => a -> ByteString
- decodeSer :: BinaryShared alpha => ByteString -> alpha
Documentation
class (Typeable alpha, Ord alpha, Eq alpha, Show alpha) => BinaryShared alpha whereSource
A class for storing Binary instances with shared nodes. Cycles are not supported, cause put and get is a one path process.
put :: alpha -> PutSharedSource
Encode a value in the Put monad.
putShared :: (alpha -> PutShared) -> alpha -> PutSharedSource
Decode a value in the Get monad
encodeFileSer :: BinaryShared a => FilePath -> a -> IO ()Source
encodeSer :: BinaryShared a => a -> ByteStringSource
decodeSer :: BinaryShared alpha => ByteString -> alphaSource