[Haskell-cafe] [Alternative] summary of my understanding so far

Richard O'Keefe ok at cs.otago.ac.nz
Mon Dec 19 06:49:26 CET 2011


On 19/12/2011, at 5:46 PM, Gregory Crosswhite wrote:
[improved Monoid documentation]

I would go so far as to point out that "mappend is a generalisation of
Data.List.sum, Data.List.product, Data.List.and, and Data.List.or,
where the initial value and combining rule are implied by the type.


> 
> This additional information unfortunately makes the documentation more verbose,

One man's "more verbose" is another man's "less cryptic".

I really don't like the emphasis on Num, as if it was a bizarre feature of
Num that there's more than one Monoid reading for it.  This is a *common*
property of data types.  For example, Sets can be seen as monoids with
empty and union; and Sets with a universe can also be seen as monoids with
universe and intersection.

The more I think about it, the less idea I have _what_ to expect for _any_
instance of Monoid.




More information about the Haskell-Cafe mailing list