[Haskell-cafe] (Co/Contra)Functor and Comonad
stephen.tetley at gmail.com
Fri Dec 24 10:51:55 CET 2010
On 24 December 2010 02:16, Mario Blažević <mblazevic at stilo.com> wrote:
> To turn the proof obligation around, what could possibly be the downside of
> adding a puny Cofunctor class to the base library?
For the record I'm personally neutral on Cofunctor and on balance
would like to see Comonad added to Base.
My reservation is really at the "meta-level" - I suspect there are a
lot of candidates for adding to Base if you want to Base to be
systematic about "modeling structures". At the moment and possibly by
accident rather than explicit intention, the structures in Base
(Monoid, Applicative, Monad, Arrow) add good sets of operational
combinators as well as modeling structures (in Monoid's case it only
adds one operational combinator but it is the basis for Foldable, the
Writer Monad and more).
For Comonad, Cofunctor (Bifunctor, Semigroup...) not having the
visibility of being in Base certainly means there is less motivation
to discover valuable operations that use them, but should they go into
Base without an initial strong operational value, instead maybe
something between Base and Hackage is needed?
Certainly, Hackage isn't great for developing "Base candidates". The
bike shedding on the Libraries list, whilst frustrating for a
proposer, is valuable for teasing out more regular designs than single
authored packages often manage, and having lots of small packages for
Base-like things is a dependency burden that hinders adoption.
More information about the Haskell-Cafe