+1 for going Brent and Ross&#39;s way, (removing Const from Control.Applicative and moving Data.Functor.Constant into base) but overall happy with the idea no matter how we do it.<div><br></div><div>I prefer the separate module approach because there are many other similar functors that we may want to migrate into base over time, and it wouldn&#39;t make sense to have one of them hiding in Control.Applicative.</div>
<div><div><br></div><div>-Edward<br><br><div class="gmail_quote">On Mon, Apr 30, 2012 at 8:38 AM, Brent Yorgey <span dir="ltr">&lt;<a href="mailto:byorgey@seas.upenn.edu" target="_blank">byorgey@seas.upenn.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Mon, Apr 30, 2012 at 01:33:39AM -0400, wren ng thornton wrote:<br>
&gt; Hello all,<br>
&gt;<br>
&gt; I recently (re)noticed the following duplication:<br>
&gt;<br>
&gt;     base:Control.Applicative<br>
&gt;         newtype Const a b = Const { getConst :: a }<br>
&gt;         instance Functor (Const m) where...<br>
&gt;         instance Monoid m =&gt; Applicative (Const m) where...<br>
&gt;<br>
&gt;     transformers:Data.Functor.Constant<br>
&gt;         newtype Constant a b = Constant { getConstant :: a }<br>
&gt;         instance Functor (Constant a) where...<br>
&gt;         instance Foldable (Constant a) where...<br>
&gt;         instance Traversable (Constant a) where...<br>
&gt;         instance (Monoid a) =&gt; Applicative (Constant a) where...<br>
&gt;<br>
&gt; I don&#39;t see any reason for this redundancy. I propose we:<br>
&gt;<br>
&gt;     (1) add the Foldable and Traversable instances to base, and<br>
&gt;     (2) deprecate transformers:Data.Functor.Constant<br>
<br>
</div>Why do it this way?  For backwards compatibility?  It seems to me it<br>
would be much more consistent to remove the one in<br>
Control.Applicative and have all the fundamental functor combinators<br>
in one place.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Brent<br>
</font></span><div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br></div></div>