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

Antoine Latter aslatter at gmail.com
Sun Dec 28 20:56:38 EST 2008


2008/12/28 Luke Palmer <lrpalmer at gmail.com>:
> 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 => Key a -> Container -> IO ()
toList :: Container -> IO [Dynamic]

You could pretty easily layer it on top of what you have above.

-Antoine


More information about the Haskell-Cafe mailing list