Re: [Haskell-cafe] Transactional container for storing anonymous deletable objects

2008-12-28 Thread Marc Weber
Hi John Sorry, I don't think I really grasp your problem? I think you're mixing two things: a) which data type to use to store whatever you like? * http://haskell.org/haskellwiki/Existential_type * Typable and Data.Dynamic etc.. b) Which container to use to put in stuff, return an identifie

Re: [Haskell-cafe] Transactional container for storing anonymous deletable objects

2008-12-28 Thread Antoine Latter
2008/12/28 Luke Palmer : > The hard way is a heteroeneous container, with an interface like: > > cons :: a -> Container -> IO (Key a) > unlink :: Key a -> Container -> IO () > toList :: ??? > If you want to change that to: cons :: Typeable a => a -> Container -> IO (Key a) unlink :: Typeable a =>

Re: [Haskell-cafe] Transactional container for storing anonymous deletable objects

2008-12-28 Thread Luke Palmer
2008/12/28 John Ky > Hi, > > I need a container data structure for storing anonymous objects - most > likely things that have not value such as STM (), but probably other things > as well. This will allow me to later on, iterate over the container and > process those objects. Additionally I hav