
On 21 Dec 2011, at 14:07, Erik Hesselink
On Wed, Dec 21, 2011 at 14:10, Bas van Dijk
wrote:
The semantics of Maybe are
clear: it's failure-and-prioritized-choice.
Are you sure?
Yes.
There are (at least) four Monoid instances for Maybe [1]. With a direct instance for Maybe and its Dual you have only covered two.
Types don't just give data a representation: types evoke structure. The data stored by Maybe can be made into a monoid in several ways, but the failure-management role of Maybe makes just one of them appropriate. Cheers Conor
Erik
[1] https://byorgey.wordpress.com/2011/04/18/monoids-for-maybe/
_______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries