TCache-0.12.1: A Transactional cache with user-defined persistence

Safe HaskellNone
LanguageHaskell98

Data.Persistent.IDynamic

Description

IDynamic is a indexable and serializable version of Dynamic. (See Data.Dynamic). It is used as containers of objects in the cache so any new datatype can be incrementally stored without recompilation. IDimamic provices methods for safe casting, besides serializaton, deserialirezation and retrieval by key.

Synopsis

Documentation

data IDynamic #

Constructors

IDyn (IORef IDynType) 

data IDynType #

Constructors

(Typeable a, Serialize a) => DRight !a 
DLeft !(ByteString, (Context, ByteString)) 

newtype Save #

Constructors

Save ByteString 

Instances

Serialize Save # 

Methods

showp :: Save -> STW () #

readp :: STR Save #

errorfied :: [Char] -> [Char] -> a #

toIDyn :: (Serialize a, Typeable * a) => a -> IDynamic #

serializedEqual :: IDynamic -> ByteString -> Bool #

check if a (possibly polimorphic) value within a IDynamic value has the given serialization"

reifyM :: (Typeable a, Serialize a) => IDynamic -> a -> IO a #