
On 3/26/11 5:29 AM, wren ng thornton wrote:
I've found the following functions helpful for working with STM. Some of them are just filling out the API so that TVars, TMVars, and IORefs match better. And all the non-TVar functions can be optimized considerably by including them in the STM library rather than defining them externally. The implementations are obvious, so I'll just include the types here; see the patch if you're interested.
[...]
Discussion period: 2 weeks.
The discussion period is up, and it sounds like the patch is in. I've filed a ticket, with the following summary. http://hackage.haskell.org/trac/ghc/ticket/5104 Supported by Edward Z. Yang, Bas van Dijk(*), Antoine Latter. No dissent. Bas van Dijk's support is generally contingent on further improving the overall API by adding similar functions for the non-STM concurrency types. However, doing so requires a deprecation cycle in order to bring modifyMVar in sync with modifyTVar, modifyIORef, and the rest of the Haskell ecosystem. And therefore should be pursued in a separate proposal. He offered a patch, http://www.haskell.org/pipermail/libraries/2011-March/016096.html, which still requires verification of correctness. These changes to the base package are not included in the current proposal. -- Live well, ~wren