Re: [Haskell-cafe] Alternative versus Monoid

On 16 December 2011 05:26, Brent Yorgey
I, for one, would be quite in favor of changing the current Monoid (Maybe a) instance to correspond to the failure-and-prioritized-choice semantics
So lets do this. Some questions: 1) What about the First type? Do we {-# DEPRECATE #-} it? 2) What about the Last type? It could be deprecated in favor of Dual. 3) Do we need a new type (like the current Maybe) for lifting semigroups into a Monoid? IMHO we don't since the semigroup package does a better job with the Option type (like Brent mentioned). 4) How much code will break from this change? 5) Anyone up for proposing this to libraries@haskell.org? Regards, Bas

Attached is a git patch for base which makes the proposed changes.

On Fri, 16 Dec 2011, Bas van Dijk wrote:
On 16 December 2011 05:26, Brent Yorgey
wrote: I, for one, would be quite in favor of changing the current Monoid (Maybe a) instance to correspond to the failure-and-prioritized-choice semantics
So lets do this. Some questions:
I wondered what the prior discussion was, but it seems you moved to here from Haskell-Cafe. http://haskell.org/pipermail/haskell-cafe/2011-December/097598.html

On 21 December 2011 12:55, Henning Thielemann
On Fri, 16 Dec 2011, Bas van Dijk wrote:
On 16 December 2011 05:26, Brent Yorgey
wrote: I, for one, would be quite in favor of changing the current Monoid (Maybe a) instance to correspond to the failure-and-prioritized-choice semantics
So lets do this. Some questions:
I wondered what the prior discussion was, but it seems you moved to here from Haskell-Cafe.
http://haskell.org/pipermail/haskell-cafe/2011-December/097598.html
Indeed. Sorry for the confusion. Bas
participants (2)
-
Bas van Dijk
-
Henning Thielemann