<p dir="ltr">+1</p>
<p dir="ltr">(This should be an hlint warning if it is not already.) </p>
<p dir="ltr">-- Dan Burton</p>
<div class="gmail_quote">On Aug 6, 2013 8:19 PM, &quot;wren ng thornton&quot; &lt;<a href="mailto:wren@freegeek.org">wren@freegeek.org</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 8/5/13 3:06 PM, Edward Kmett wrote:<br>
&gt; Right now the definition of Control.Monad.void is:<br>
&gt;<br>
&gt; void :: Functor f =&gt; f a -&gt; f ()<br>
&gt;<br>
&gt; void = fmap (const ())<br>
&gt;<br>
&gt; I propose we replace it with<br>
&gt;<br>
&gt; void :: Functor f =&gt; f a -&gt; f ()<br>
&gt;<br>
&gt; void = (() &lt;$)<br>
&gt;<br>
&gt; This expands out to the former definition by the default definition of<br>
&gt; (&lt;$) and Data.Functor.Functor exports (&lt;$) explicitly to make it<br>
&gt; possible to optimize this sort of thing. It seems a shame not to use<br>
&gt; it.<br>
<br>
+1. That was the entire point of (&lt;$) being added to the class afterall.<br>
<br>
--<br>
Live well,<br>
~wren<br>
<br>
<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
</blockquote></div>