MonadRef class or the like?

Ashley Yakeley ashley@semantic.org
Wed, 18 Sep 2002 16:57:59 -0700


At 2002-09-18 15:22, Hal Daume III wrote:

>Ashley: Proposes:
>  data Ref m a = MkRef { get :: m a, set :: a -> m () }
>  class RefMonad m where { newRef :: a -> m (Ref m a) }
>wants to ensure (like John) that it is easy to move these things across
>lifted monads.

This is what I ended up doing for HBase:
<http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/hbase/Source/HBa
se/Category/MonadReference.hs?rev=HEAD&content-type=text/plain>



-- 
Ashley Yakeley, Seattle WA