<p dir="ltr">But IO actions *are* pure values. What side effects do they have? None! You can do whatever you want with them with no harmful effects in any Haskell expression. They only special thing about them is that they have a run function that is not itself provided in Haskell. The run function is actually not legal to expose in pure Haskell. Even if it were exposed, *that function* would be the impure thing, not the IO actions you apply it to. (This is why GHC has unsafePerformIO and not UnsafeIO). </p>

<p dir="ltr">- Jake </p>
<div class="gmail_quote">On Aug 6, 2013 5:29 AM, &quot;J. Stutterheim&quot; &lt;<a href="mailto:j.stutterheim@me.com">j.stutterheim@me.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
That argument makes sense, although I find it a bit counter-intuitive still. If I saw the function `pure` for the first time, my first impression (however wrong it may be) would be that it takes a pure value (regardless of context) and does something with it. Applying `pure` to an IO operation goes against that intuition.<br>

<br>
Looking at the type of `return :: a -&gt; m a&quot;, there are several slightly more intuitive (to me) options in this discussion already:<br>
<br>
lift: the value `a` is lifted into the monad `m`<br>
pack: the value `a` is packed into the monad `m`<br>
wrap: the value `a` is wrapped in the monad `m`<br>
inject: the value `a` is injected into the monad `m`<br>
promote: the value `a` is promoted to a monad `m a`<br>
<br>
<br>
On 6 Aug 2013, at 10:16, Tobias Dammers &lt;<a href="mailto:tdammers@gmail.com">tdammers@gmail.com</a>&gt; wrote:<br>
<br>
&gt; It is a pure value in the context of the outer monad (the one you wrap it in). I&#39;d say pure is still appropriate.<br>
&gt;<br>
&gt; On Aug 6, 2013 10:14 AM, &quot;Tom Ellis&quot; &lt;<a href="mailto:tom-lists-haskell-cafe-2013@jaguarpaw.co.uk">tom-lists-haskell-cafe-2013@jaguarpaw.co.uk</a>&gt; wrote:<br>
&gt; On Tue, Aug 06, 2013 at 10:03:04AM +0200, J. Stutterheim wrote:<br>
&gt; &gt; `putStrLn &quot;Hi&quot;` is not a pure value...<br>
&gt;<br>
&gt; Why not?<br>
&gt;<br>
&gt; _______________________________________________<br>
&gt; Haskell-Cafe mailing list<br>
&gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
&gt; _______________________________________________<br>
&gt; Haskell-Cafe mailing list<br>
&gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div>