
6 Mar
2007
6 Mar
'07
1:08 p.m.
On Mon, Mar 05, 2007 at 02:11:58PM -0800, Jeffrey Yasskin wrote:
On 3/4/07, David Menendez
wrote: Rather than have two wrappers, I say make the a Monoid instance for Maybe using a left-biased choice (like the MonadPlus instance).
Then we would get right-biased choice for free with the Dual wrapper.
That's a reasonable idea, but I chose against it in the proposal because it arbitrarily picks one of the two sensible monoids for Maybe, which I'm worried will confuse users, especially since Haddock doesn't currently provide documentation for instances.
There is another, combining two Justs using a Monoid instance on the argument. It could be argued that this is an even better candidate for the "obvious" instance on Maybe.