+1 for adding a Contrafunctor/ContraFunctor to base somewhere. But I agree completely with Tony, please call it contramap. ;) Otherwise people will wonder why comonads are not cofunctors -- a matter which can be cleared up by avoiding sloppy terminology.<div>
<br></div><div>+1 for adding Comonads. As an aside, since Haskell doesn&#39;t have (nor could it have) coexponential objects, there is no &#39;missing&#39; Coapplicative concept that goes with it, so there can be no objection on the grounds of lack of symmetry even if the Functor =&gt; Applicative =&gt; Monad proposal goes through. </div>
<div><br></div><div>I have been meaning to split off a &#39;comonads&#39; package from category-extras for a while, in a way that avoids requiring tons of crazy machinery. I have a candidate that I just need to polish up a bit and throw on hackage -- perhaps that could serve as a straw man proposal?</div>
<div><br></div><div>-Edward<br><br><div class="gmail_quote">On Fri, Dec 24, 2010 at 4:51 AM, Stephen Tetley <span dir="ltr">&lt;<a href="mailto:stephen.tetley@gmail.com">stephen.tetley@gmail.com</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 24 December 2010 02:16, Mario Blažević &lt;<a href="mailto:mblazevic@stilo.com">mblazevic@stilo.com</a>&gt; wrote:<br>
<br>
&gt; To turn the proof obligation around, what could possibly be the downside of<br>
&gt; adding a puny Cofunctor class to the base library?<br>
<br>
</div>Hi Mario<br>
<br>
For the record I&#39;m personally neutral on Cofunctor and on balance<br>
would like to see Comonad added to Base.<br>
<br>
My reservation is really at the &quot;meta-level&quot; - I suspect there are a<br>
lot of candidates for adding to Base if you want to Base to be<br>
systematic about &quot;modeling structures&quot;. At the moment and possibly by<br>
accident rather than explicit intention, the structures in Base<br>
(Monoid, Applicative, Monad, Arrow) add good sets of operational<br>
combinators as well as modeling structures (in Monoid&#39;s case it only<br>
adds one operational combinator but it is the basis for Foldable, the<br>
Writer Monad and more).<br>
<br>
For Comonad, Cofunctor (Bifunctor, Semigroup...) not having the<br>
visibility of being in Base certainly means there is less motivation<br>
to discover valuable operations that use them, but should they go into<br>
Base without an initial strong operational value, instead maybe<br>
something between Base and Hackage is needed?<br>
<br>
Certainly, Hackage isn&#39;t great for developing &quot;Base candidates&quot;. The<br>
bike shedding on the Libraries list, whilst frustrating for a<br>
proposer, is valuable for teasing out more regular designs than single<br>
authored packages often manage, and having lots of small packages for<br>
Base-like things is a dependency burden that hinders adoption.<br>
<br>
Best wishes<br>
<font color="#888888"><br>
Stephen<br>
</font><div><div></div><div class="h5"><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>
</div></div></blockquote></div><br></div>