On Tue, Sep 9, 2008 at 11:36, Jules Bean <[EMAIL PROTECTED]> wrote: > ...not only must it be safe to be called with invalid inputs, but it most > not have any long-term effects, whether the input is valid or invalid, since > I do not believe that there is any way for the function to 'undo' its effect > at 'retry' time.
Maybe this is an idea for an extension to the STM system, adding something like unsafeIOToSTM, except that in addition to the main IO action, it also takes two more IO actions that are invoked on rollback and commit, respectively. This might allow for integration with transactional systems (e.g. a remote transaction on an rdbms), although to support two-phased commit we'd need a third action for the "prepare" step. cheers, Arnar _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe