On 16 December 2011 16:26, Yves Parès <limestr...@gmail.com> 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.
The reason you need to be specific with Int is that it's not clear which semantics (sum or product) you want. The semantics of Maybe are clear: it's failure-and-prioritized-choice. Changing the order of the arguments of mappend should be the job of Dual. If we really want to drop the Monoid instance for Maybe and keep First and Last and also want to be consistent we should also drop the Monoid instances of [a], a->b, Endo a and of all the tuples. And instead define Monoid instance for First [a], Last [a], First (a->b), Last (a->b), etc. I don't think this is what we want. Regards, Bas _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe