Duncan Coutts wrote:
On Thu, 2009-01-15 at 19:46 +0000, Andrew Coppin wrote:

PS. As a small aside... Is the Monoid class actually used *anywhere* in all of Haskell?

Yes.

They're used quite a lot in Cabal. Package databases are monoids.
Configuration files are monoids. Command line flags and sets of command
line flags are monoids. Package build information is a monoid.

OK, well then my next question would be "in what say is defining configuration files as a monoid superior to, uh, not defining them as a monoid?" What does it allow you to do that you couldn't otherwise? I'm not seeing any obvious advantage, but you presumably did this for a reason...

It is also used in the Foldable class which is a nice interface for
traversing/visiting structures. Binary serialisation is also a monoid.

Foldable I'm vaguely familiar with. Its utility is more apparent.

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to