22 Oct
2002
22 Oct
'02
7:56 p.m.
It has a different type:
atomicModifyIORef :: IORef a -> (a -> (a,b)) -> IO b modifyIORef :: IORef a -> (a -> a) -> IO ()
It would break backwards compatability, but
modifyIORef_ :: IORef a -> (a -> IO a) -> IO () modifyIORef :: IORef a -> (a -> IO (a, b)) -> IO b
(both specified atomic) would be consistent with the MVar names.
Did you really mean those types, and not the types I quoted? That implies unsafeInterleaveIO if they have to be atomic. Cheers, Simon