<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, "wren ng thornton" <<a href="mailto:wren@freegeek.org">wren@freegeek.org</a>> 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>
> Right now the definition of Control.Monad.void is:<br>
><br>
> void :: Functor f => f a -> f ()<br>
><br>
> void = fmap (const ())<br>
><br>
> I propose we replace it with<br>
><br>
> void :: Functor f => f a -> f ()<br>
><br>
> void = (() <$)<br>
><br>
> This expands out to the former definition by the default definition of<br>
> (<$) and Data.Functor.Functor exports (<$) explicitly to make it<br>
> possible to optimize this sort of thing. It seems a shame not to use<br>
> it.<br>
<br>
+1. That was the entire point of (<$) 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>