[Proposal] Add instance Monoid a => Monoid (Const a b)

Gershom Bazerman gershomb at gmail.com
Sat Oct 12 17:57:51 UTC 2013

On 10/12/13 1:32 PM, Edward Kmett wrote:
> Between moving Identity into base and removing Constant it would mean 
> that transformers would then only have to contain ...well.. 
> transformers. =)
> -Edward
Well, not quite. Compose should migrate into base at well at some point, 
I think. Especially since currently we have traversable laws in base 
using a datatype _not_ in base!

I can see an argument in favor of Product as well, but also an argument, 
perhaps, that the product of two functors is somewhat less common than 
their composition.

I consider the whole "polynomial functor toolkit" as pretty basic. But I 
can see a slippery-slope danger that we should only bring in those 
components that make other "basic" parts of base more elegant.

Also, we should bear in mind that "growing" the algebraic part of base 
(Traversable, Functors, etc.) doesn't necessarily go against the spirit 
of then taking these slightly larger units of conceptual functionality 
and splitting them out from "core-base" in the next go-round.


More information about the Libraries mailing list