[Haskell-cafe] Alternative versus Monoid
conor at strictlypositive.org
Wed Dec 21 18:20:03 CET 2011
On 21 Dec 2011, at 14:07, Erik Hesselink <hesselink at gmail.com> wrote:
> On Wed, Dec 21, 2011 at 14:10, Bas van Dijk <v.dijk.bas at gmail.com>
> The semantics of Maybe are
>> clear: it's failure-and-prioritized-choice.
> Are you sure?
> There are (at least) four Monoid instances for Maybe
> . 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
>  https://byorgey.wordpress.com/2011/04/18/monoids-for-maybe/
> Libraries mailing list
> Libraries at haskell.org
More information about the Libraries