
5 Mar
2007
5 Mar
'07
12:08 a.m.
Jeffrey Yasskin writes:
I've created http://hackage.haskell.org/trac/ghc/ticket/1189 to suggest adding two Monoid instances around Maybe that, instead of accumulating things like most monoids, just pick the first or last piece of data they see.
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.
--
David Menendez