On Wed, Dec 29, 2010 at 7:37 AM, Ian Lynagh <igloo@earth.li> wrote:
On Thu, Dec 23, 2010 at 04:43:24PM -0500, Mario Blažević wrote:
> Why are Cofunctor and Comonad classes not a part of the base library?
Base is already too large IMO. Why do these classes /need/ to be in
base, rather than another package?
Classes in general /need/ to be declared in an easy to find and unambiguously recommended place. Otherwise people either won't declare their instances, or will declare incompatible classes themselves. Class dependencies also won't be declared, because nobody would go to the trouble of declaring a more generic type that depends on a class nobody's heard of.
The best place according to the "unambiguously recommended and easy to find" criteria is the base library. The next best would be a Hackage library with minimal dependencies, whose name exactly corresponds to the class - contrafunctor or control-contrafunctor, for example. This solution would be good enough for anybody (including myself) who already knows they need to declare or use a class instance, but most people would remain unaware of them.