Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- newtype IDynamic = IDyn (IORef IDynType)
- data IDynType
- = forall a.(Typeable a, Serialize a) => DRight !a
- | DLeft !(ByteString, (Context, ByteString))
- newtype Save = Save ByteString
- tosave :: IDynamic -> IDynamic
- errorfied :: String -> String -> a
- dynPrefix :: String
- dynPrefixSp :: ByteString
- notreified :: ByteString
- toIDyn :: (Typeable a, Serialize a) => a -> IDynamic
- serializedEqual :: IDynamic -> ByteString -> Bool
- fromIDyn :: (Typeable a, Serialize a) => IDynamic -> a
- safeFromIDyn :: (Typeable a, Serialize a) => IDynamic -> Either String a
- reifyM :: (Typeable a, Serialize a) => IDynamic -> a -> IO a
Documentation
forall a.(Typeable a, Serialize a) => DRight !a | |
DLeft !(ByteString, (Context, ByteString)) |
serializedEqual :: IDynamic -> ByteString -> Bool Source #
check if a (possibly polimorphic) value within a IDynamic value has the given serialization"