[Haskell-cafe] Alternative versus Monoid

Gregory Crosswhite gcrosswhite at gmail.com
Sat Dec 17 05:57:55 CET 2011


On Dec 17, 2011, at 1:26 AM, Yves Parès wrote:

> "1) What about the First type? Do we {-# DEPRECATE #-} it?"
> 
> Personnaly, I'm in favor of following the same logic than Int:
> Int itself is not a monoid. You have to be specific: it's either Sum or Mult.
> 
> It should be the same for Maybe: we remove its instance of Monoid, and we only use First and Last.


+1 for this idea, because it follows the principle of least surprise.

Cheers,
Greg

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111217/d2cbd43a/attachment.htm>


More information about the Haskell-Cafe mailing list