
25 Feb
2010
25 Feb
'10
6 p.m.
Simon Marlow wrote:
atomicallyIO :: STM (IO a) -> IO a atomicallyIO ioSTM = join $ atomically ioSTM
afterCommit :: IO a -> STM (IO a) afterCommit mIO = return mIO
The name "afterCommit" might be confusing. To me it suggests that the argument is added to some kind of list to be run at the end of the transaction. For example: atomicallyIO $ do .. STM .. afterCommit $ print 1 .. STM .. afterCommit $ print 2 This does would only print 2, because the return value of the first afterCommit is ignored. Twan