<div dir="ltr">Underlying ST is: GHC.Prim.State# s -> (# GHC.Prim.State# s, a #)<br clear="all"><div><br></div><div>Underlying IO is: GHC.Prim.State# GHC.Prim.RealWorld</div><div> -> (# GHC.Prim.State# GHC.Prim.RealWorld, a #)</div><div><br></div><div>Based on the (very helpful!) conversation I had on the #ghc IRC channel, it seems to me that the mechanism for preventing things like reordering operations or spurious sharing is shared in common between ST and IO via State#. Is this accurate? I believe the exception is how RealWorld is used w/ IO but we can put that off for this question.</div><div><br></div><div>If anyone could confirm this understanding that would be helpful. If anyone could point out exceptions to this notion, I'd very much appreciate that as well.</div><div><br></div><div><br></div><div>Thanks again for everyone's time.</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Chris Allen<br><div><span style="font-size:12.8px">Currently working on </span><a href="http://haskellbook.com" target="_blank">http://haskellbook.com</a></div></div></div></div></div></div>
</div>