@?1     Resources returned by withSTMResources' +resources to be inserted back in the cache Bresources to be deleted from the cache and from permanent storage result to be returned forces a retry KA general interface for indexable, serializable and input-output objects.    and L are implemented by default as read-write to files with its key as filename    and  V are specified just to allow these defaults. If you define your own persistence, then   serialize and  deserialize are not needed. The package Workflow need them anyway. 8minimal definition: keyResource, serialize, deserialize zWhile serialize and deserialize are agnostic about the way of converison to strings, either binary or textual, treadp and utshowp use the monad defined in the RefSerialize package. Both ways of serialization are alternative. one is defined oby default in terms of the other. the RefSerialize monad has been introduced to permit IResource objects to be fserialized as part of larger structures that embody them. This is necessary for the Workdlow package. \The keyResource string must be a unique since this is used to index it in the hash table. dwhen accessing a resource, the user must provide a partial object for wich the key can be obtained.  for example:  Adata Person= Person{name, surname:: String, account :: Int ....)   keyResource Person n s ...= n++sTthe data being accesed must have the fields used by keyResource filled. For example   readResource Person {name=John , surname= Adams})leaving the rest of the fields undefined JIResource has defaults definitions for all the methods except keyResource h Either one or other serializer must be defiened for default witeResource, readResource and delResource  resources= Resources [] [] ()    JKey datatype can be used to read any object trough the Dynamic interface.   data Key = Key  String deriving TypeableExample  mst <-  getDResource $  type keyofDesiredObject  case mst of " Nothing -> error $ " not found "++ key @ Just (idyn) -> fromIDyn idyn :: DesiredDatatype}DynamicInterface groups a set of default method calls to handle dynamic objects. It is not necessary to derive instances from it 7Data.IDynamic is a indexable and serializable version  Data.Dynamic . MIDinamic provices methods for safe casting, serializaton, deserialization, registration output and input ,the data definition of IDymanic is as such:  Sdata IDynamic= forall a. (Typeable a, IResource a) => IDynamic a deriving Typeable The registration trough  registerType& is necessary before deserialization:   :: IO Type  example: module Main where import Data.IResource import Data.IDynamic import Data.Typeable  "instance IResource Int where  keyResource x= "I"  serialize = show  deserialize = read  defPath _= "data/ "   instance IResource String where  keyResource x= take 5 x  serialize = show  deserialize = read  defPath _= "data/"   main= do  putStrLn ".see the code to know the meaning of he results" T registerType :: IO Int -- register both datatypes (Int, and String)  registerType :: IO String  let x= 1 :: Int   let list= [IDynamic x, IDynamic "hello, how are you"]  +let assoc= zip (map keyResource list) list 3 print $ lookup (keyResource (5 ::Int)) assoc  mapM writeResource list  mds <- readResource $ IDynamic "hello"  case mds of  Nothing -> error "must have been Just!"  Just ds -> do - putStrLn $ serialize ds 7 let str= fromIDyn ds :: String " putStrLn str  1let y= fromIDyn ds :: Int -- casting error  print y          !" IDynamic-0.1Data.IResource Data.IDynamicbase Data.Typeable ResourcestoAddtoDeletetoReturnRetry ModifTime AccessTime IResource keyResource serialize deserializedefPath readResource writeResource delResource resourcesKeyDynamicInterfacetoIDyn registerTypefromIDynunsafeFromIDyn safeFromIDynIDynamiclistinfinitereadFileStrictTypeRephash