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) 
Instances
Show IDynamic # 
Instance details

Defined in Data.Persistent.IDynamic

Serialize IDynamic # 
Instance details

Defined in Data.Persistent.IDynamic

Methods

showp :: IDynamic -> STW () #

readp :: STR IDynamic #

data IDynType #

Constructors

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

newtype Save #

Constructors

Save ByteString 
Instances
Serialize Save # 
Instance details

Defined in Data.Persistent.IDynamic

Methods

showp :: Save -> STW () #

readp :: STR Save #

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

toIDyn :: (Typeable a, Serialize 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 #