Thanks, Ryan, for the reminder and explanation of this problem.&nbsp; - Conal<br><br><div class="gmail_quote">On Mon, Apr 28, 2008 at 8:01 PM, Ryan Ingram &lt;<a href="mailto:ryani.spam@gmail.com">ryani.spam@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">The problem I have with all of these STM-based solutions to this<br>
problem is that they don&#39;t actually cache until the action fully<br>
executes successfully.<br>
<br>
For example, if you have a :: TIVal a, and f :: a -&gt; TIVal b, and you execute<br>
 &nbsp; force (a &gt;&gt;= f)<br>
<br>
and the action returned by f executes retry for whatever reason, then<br>
the caching done in &quot;a&quot; gets undone. &nbsp;Ideally I want to be able to<br>
provide some proof that the result of a is pure and have it committed<br>
immediately when it finishes.<br>
<br>
Every attempt I&#39;ve had so far to solve this problem ends up being some<br>
type of the form<br>
 &nbsp; newtype X a = IO (STM (Either a (X a)))<br>
which has its own problems.<br>
<font color="#888888"><br>
 &nbsp;-- ryan<br>
</font></blockquote></div><br>