> Just before this gets out of the door... any chance of calling it > > modifyIORef > > and documenting that it's atomic? Sometimes names can get too long!
There's two reasons you might use the function: convenience and atomicity. I can easily imagine someone modifying a program, thinking that it was used for convenience, replacing it with non-atomic 'equivalent' code and breaking the code in a way that will take a lot of testing to find. Being explicit that it has this special, important property protects against that. But what if I am only using it for convenience and I want to document that fact? One could make a good case for adding plain modifyIORef which may or may not be atomic. Or, we can avoid the issue altogether by not adding an atomicity guarantee. If you use concurrency, use MVars, if you don't use concurrency, you don't need it. -- Alastair _______________________________________________ FFI mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/ffi