That argument doesn&#39;t totally fly since non-termination isn&#39;t considered an effect in Haskell.&nbsp; Bottom doesn&#39;t commute with a IO operations normally either.<br>But not having readIVar return &#39;IO a&#39; does make me a little quesy. :)
<br><br>&nbsp; -- Lennart<br><br><div class="gmail_quote">On Dec 4, 2007 8:25 AM, Simon Peyton-Jones &lt;<a href="mailto:simonpj@microsoft.com">simonpj@microsoft.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;">









<div link="blue" vlink="purple" lang="EN-GB">

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">But since the read may block, it matters *<b>when</b>* you
perform it.&nbsp; For example if you print "Hello" and then read the IVar, you'll
block after printing; but if you read the IVar and then print, the print won't
come out.&nbsp; If the operation was pure (no IO) then you'd have a lot less control
over when it happened.</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Simon</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>

<div style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; border-width: medium medium medium 1.5pt; padding: 0cm 0cm 0cm 4pt;">

<div>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">

<p><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> <a href="mailto:haskell-bounces@haskell.org" target="_blank">haskell-bounces@haskell.org</a>
[mailto:<a href="mailto:haskell-bounces@haskell.org" target="_blank">haskell-bounces@haskell.org</a>] <b>On Behalf Of </b>Lennart Augustsson<br>
<b>Sent:</b> 04 December 2007 08:19<br>
<b>To:</b> Conal Elliott<br>
<b>Cc:</b> <a href="mailto:haskell@haskell.org" target="_blank">haskell@haskell.org</a><br>
<b>Subject:</b> Re: [Haskell] IVars</span></p>

</div>

</div><div><div></div><div class="Wj3C7c">

<p>&nbsp;</p>

<p style="margin-bottom: 12pt;">Good question.&nbsp; That must
be a matter of taste, because as you say the read will always produce the same
result.&nbsp; But it sill is a bit of a strange operation.<br>
<br>
&nbsp; -- Lennart</p>

<div>

<p>On Dec 4, 2007 6:25 AM, Conal Elliott &lt; <a href="mailto:conal@conal.net" target="_blank">conal@conal.net</a>&gt; wrote:</p>

<p>Oh.&nbsp; Simple enough.&nbsp; Thanks. <br>
<br>
Another question:&nbsp; why the IO in readIVar :: IVar a -&gt; IO a, instead of
just readIVar :: IVar a -&gt; a?&nbsp; After all, won&#39;t readIVar iv yield the
same result (eventually) every time it&#39;s called? </p>

<div>

<div>

<p style="margin-bottom: 12pt;">&nbsp;</p>

<div>

<p>On Dec 3, 2007 12:29 AM, Lennart Augustsson &lt;<a href="mailto:lennart@augustsson.net" target="_blank">lennart@augustsson.net</a>&gt;
wrote:</p>

<p style="margin-bottom: 12pt;">You can make them from MVars.</p>

<div>

<div>

<p>On Dec 2, 2007 8:03 PM, Conal Elliott &lt;<a href="mailto:conal@conal.net" target="_blank">conal@conal.net</a>&gt; wrote:</p>

</div>

<blockquote style="border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color rgb(204, 204, 204); border-width: medium medium medium 1pt; padding: 0cm 0cm 0cm 6pt; margin-left: 4.8pt; margin-right: 0cm;">


<div>

<p style="margin-bottom: 12pt;">what became of (assign-once)
IVars?&nbsp; afaict, they were in concurrent haskell and now aren&#39;t.</p>

</div>

<p style="margin-bottom: 12pt;">_______________________________________________<br>
Haskell mailing list<br>
<a href="mailto:Haskell@haskell.org" target="_blank">Haskell@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell" target="_blank">http://www.haskell.org/mailman/listinfo/haskell
</a></p>

</blockquote>

</div>

<p>&nbsp;</p>

</div>

<p>&nbsp;</p>

</div>

</div>

<p style="margin-bottom: 12pt;"><br>
_______________________________________________<br>
Haskell mailing list<br>
<a href="mailto:Haskell@haskell.org" target="_blank">Haskell@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell" target="_blank">http://www.haskell.org/mailman/listinfo/haskell</a></p>

</div>

<p>&nbsp;</p>

</div></div></div>

</div>

</div>


<br>_______________________________________________<br>Haskell mailing list<br><a href="mailto:Haskell@haskell.org">Haskell@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell" target="_blank">http://www.haskell.org/mailman/listinfo/haskell
</a><br><br></blockquote></div><br>