The problem I have with all of these STM-based solutions to this problem is that they don't actually cache until the action fully executes successfully.
For example, if you have a :: TIVal a, and f :: a -> TIVal b, and you execute force (a >>= f) and the action returned by f executes retry for whatever reason, then the caching done in "a" gets undone. Ideally I want to be able to provide some proof that the result of a is pure and have it committed immediately when it finishes. Every attempt I've had so far to solve this problem ends up being some type of the form newtype X a = IO (STM (Either a (X a))) which has its own problems. -- ryan _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe