On Thu, 13 Nov 2003 16:06:24 -0500 "Abraham Egnor" <aegnor@antioch-college.edu> wrote: Sorry that I'm too lazy to download the the tar.bz2 and see for myself, but...
that applies those functions to a monadic reference. Instances for MRef are provided for both IORef and STRef.
Assuming MRef is like the below, did you include Lazy.ST too? On a more general note, sticking something like MonadRef somewhere in the heirarchical libs seems like it would be useful. Or perhaps Iavor's monad library? instance MonadRef IO IORef where newRef = newIORef readRef = readIORef writeRef = writeIORef instance MonadRef (Lazy.ST s) (STRef s) where newRef = Lazy.strictToLazyST . newSTRef readRef = Lazy.strictToLazyST . readSTRef writeRef = (Lazy.strictToLazyST .) . writeSTRef instance MonadRef (Strict.ST s) (STRef s) where newRef = newSTRef readRef = readSTRef writeRef = writeSTRef