On 2012/1/1 Ertugrul Söylemez <span dir="ltr">&lt;<a href="mailto:es@ertes.de">es@ertes.de</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">Steve Horne &lt;<a href="mailto:sh006d3592@blueyonder.co.uk">sh006d3592@blueyonder.co.uk</a>&gt; wrote:<br>
&gt; Of course even the bind operator arguably isn&#39;t primitive. We could<br>
&gt; translate to get rid of those too, and see what lies underneath. This<br>
&gt; is where we start seeing functions of type...<br>
&gt;<br>
&gt;    World -&gt; (x, World)<br>
&gt;<br>
&gt; Problem - this level of abstraction is hypothetical. It is not part of<br>
&gt; the Haskell language. Haskell specifically defines the IO monad to be<br>
&gt; a black box.<br>
<br>
</div>And that&#39;s fine, because IO is an embedded DSL.  A better view of IO is<br>
a GADT like:<br>
<br>
    data IO :: * -&gt; * where<br>
        GetLine  :: IO String<br>
        PutStrLn :: String -&gt; IO ()<br>
        ...<br>
<br>
This is still hypothetical, but it shows how even IO is easily<br>
referentially transparent (as long as you don&#39;t use unsafe* cheats).<br></blockquote><div><br>What?? I see how a definition like this one shows how something else that you call &quot;IO&quot; can be denotative &amp; RT. I don&#39;t see how what that conclusion has to do with Haskell&#39;s IO.<br>

<br>I also wonder whether you&#39;re assuming that all of the IO primitives we have in Haskell treat their non-IO arguments denotationally/extensionally, so that there cannot be operations like &quot;isWHNF :: a -&gt; IO Bool&quot;.<br>

<br>  - Conal<br></div></div>