-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Sharing for the binary package
--   
--   I had problems with the size of the allocated heap space after
--   serializing and loading data with the binary package. The reason was
--   that binary does not support sharing of identical elements, so I came
--   up with the generic solution in this package.
@package binary-shared
@version 0.8.3


-- | Binary serializing with sharing
module Data.Binary.Shared

-- | A class for storing Binary instances with shared nodes. Cycles are not
--   supported, cause put and get is a one path process.
class (Typeable alpha, Ord alpha, Eq alpha, Show alpha) => BinaryShared alpha

-- | Encode a value in the Put monad.
put :: BinaryShared alpha => alpha -> PutShared
putShared :: BinaryShared alpha => (alpha -> PutShared) -> alpha -> PutShared

-- | Decode a value in the Get monad
get :: BinaryShared alpha => GetShared alpha
getShared :: BinaryShared alpha => GetShared alpha -> GetShared alpha
encodeFileSer :: BinaryShared a => FilePath -> a -> IO ()
encodeSer :: BinaryShared a => a -> ByteString
decodeSer :: BinaryShared alpha => ByteString -> alpha
instance Data.Binary.Shared.BinaryShared a => Data.Binary.Shared.BinaryShared [a]
instance Data.Binary.Shared.BinaryShared a => Data.Binary.Shared.BinaryShared (GHC.Maybe.Maybe a)
instance (Data.Binary.Shared.BinaryShared a, Data.Binary.Shared.BinaryShared b) => Data.Binary.Shared.BinaryShared (a, b)
instance Data.Binary.Shared.BinaryShared a => Data.Binary.Shared.BinaryShared (Data.Set.Internal.Set a)
instance (Data.Binary.Shared.BinaryShared k, Data.Binary.Shared.BinaryShared e) => Data.Binary.Shared.BinaryShared (Data.Map.Internal.Map k e)
instance Data.Binary.Shared.BinaryShared GHC.Types.Bool
instance Data.Binary.Shared.BinaryShared GHC.Types.Char
instance Data.Binary.Shared.BinaryShared GHC.Types.Int
instance Data.Binary.Shared.BinaryShared GHC.Num.Integer.Integer
instance Data.Binary.Shared.BinaryShared Data.ByteString.Internal.Type.ByteString
instance GHC.Classes.Eq Data.Binary.Shared.Object
instance GHC.Classes.Ord Data.Binary.Shared.Object
