On 4/23/08, Jan-Willem Maessen <[EMAIL PROTECTED]> wrote: > I've been trying to decide whether either of these is implementable in terms > of `orElse`, in such a way that we immediately check the predicate upon > retry before doing anything else. I can't quite make up my mind whether > this is possible or not.
I do not think it is possible; consider this case: broken = atomically $ do v <- expensive_computation :: STM (TVar Int) retryUntil v (> 50) Given that you don't know which tvar to use until the end of the expensive computation, I don't see how you can lift "orElse" to the make that tvar be the first thing checked when the transaction is rerun. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe