binary-shared-0.8: Sharing for the binary packageSource codeContentsIndex
Data.Binary.Shared
Description
Binary serializing with sharing
Synopsis
class (Typeable alpha, Ord alpha, Eq alpha, Show alpha) => BinaryShared alpha where
put :: alpha -> PutShared
putShared :: (alpha -> PutShared) -> alpha -> PutShared
get :: GetShared alpha
getShared :: GetShared alpha -> GetShared alpha
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.
Methods
put :: alpha -> PutSharedSource
Encode a value in the Put monad.
putShared :: (alpha -> PutShared) -> alpha -> PutSharedSource
get :: GetShared alphaSource
Decode a value in the Get monad
getShared :: GetShared alpha -> GetShared alphaSource
encodeFileSer :: BinaryShared a => FilePath -> a -> IO ()Source
encodeSer :: BinaryShared a => a -> ByteStringSource
decodeSer :: BinaryShared alpha => ByteString -> alphaSource
Produced by Haddock version 2.6.0