<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><font class="Apple-style-span" face="arial, sans-serif"><br></font>
The main question is: does the STM transaction actually &quot;see&quot; that I changed<br>
part of the underlying array, so that the transaction gets re-tried? Or do I<br>
have to implement this manually, and if yes: how?<br><br></blockquote><div><br></div><div>The transaction does not detect anything inside the unsafeIOtoSTM.  But to implement this manually is  simple: use &quot;retry&quot; whenever you need to retry the local  transaction. if the affected transactions are more than the local trnasaction, create an special TVar to be inspected by all of them. for example  doesTheArrayHasChanged :: TVar Bool.</div>

</div>