Two questions came to mind while thinking of memory references in Haskell:

1. Is there a "standard" equivalent of the following:

class (Monad m) => MonadMemory m r | m -> r where
    new :: a -> m (r a)
    read :: r a -> m a
    write :: r a -> a -> m ()

What kind of axioms should an instance of this class satisfy?

2. How would a "pure" instance of this class look like (obvious 
unsafePerformIO-based solutions aside)? Is it even possible in pure Haskell?

Thanks much!
-- 
Ariel J. Birnbaum
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to