On Wed, Mar 13, 2013 at 2:58 AM, David Luposchainsky <span dir="ltr">&lt;<a href="mailto:dluposchainsky@googlemail.com" target="_blank">dluposchainsky@googlemail.com</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">

1. void is currently in Control.Monad. However, it is defined<br>
   only in terms of fmap (and therefore only has a Functor<br>
   constraint). Although this function is often used in a<br>
   monadic setting as &quot;&gt;&gt; return ()&quot;, I really don&#39;t think<br>
   Control.Monad is the right place for it.<br></blockquote><div><br></div><div>We could reexported the function in both places so we don&#39;t have to break code that depends on its current location.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

2. a) swap is the only function from Data.Tuple that is not<br>
      exported to Prelude. On #haskell, people are sometimes<br>
      even surprised there /is/ a Data.Tuple, and redefine<br>
      their own version of swap at need. I therefore suggest<br>
      including Data.Tuple.swap in the Prelude.<br>
<br>
      The obvious downside of this change would of course be<br>
      that it breaks code if there is a top-level user-defined<br>
      version of it. Fixing this is of course trivial, but<br>
      necessary.<br></blockquote><div><br></div><div>I don&#39;t think we should add any more functions to the Prelude. It&#39;s a module that&#39;s automatically put into scope into every module (unless you explicitly use NoImplicitPrelude). Putting things in a global namespace like that is bad.</div>

<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
   b) A related suggestion would be the addition of an<br>
      irrefutable swap, (swap&#39;?), defined as<br>
      &quot;swap ~(a,b) = (b,a)&quot;, and its addition to Prelude for<br>
      the same reasons.<br></blockquote><div><br></div><div>Add it to Data.Tuple.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">3. $&gt;, a flipped version of &lt;$, currently resides in<br>


   Control.Comonad, but should be in Data.Functor. Applicative<br>
   has &lt;* and *&gt;, Monad has &gt;&gt;= and =&lt;&lt;, and I personally keep<br>
   redefining (or specifically importing) $&gt; quite often, and I<br>
   don&#39;t think I&#39;m the only one.<br></blockquote><div><br></div><div>Makes sense to me.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As these are quite small changes I think 2 weeks should be a<br>


sufficiently long discussion period.<br></blockquote><div><br></div><div>Adding things to the Prelude is not a small thing! :)</div><div><br></div><div>-- Johan</div><div> </div></div>