Hi,
Michael Snoyman <michael@snoyman.com> writes:
[...]
>> Because they're properly represented as semigroups too, just like Min and...this seems to call for better documentation (including
>> Max (i.e. they don't behave sensibly "out of the box" on empty lists). The
>> semigroups package already provides the proper types and instances. And
>> just like Min and Max, the semigroups package lets you "lift" its First and
>> Last into Monoids with the Option type.
> Just because such a lifting is possible doesn't mean that it will be
> intuitive or obvious to new users. (I wouldn't know how to make this
> switch, for example.)
examples) of the Data.Semigroup.Option Monoid instance then.
Do you have an example where it might not be obvious how to use
Option (Semigroup.First a)
instead of
Monoid.First a
?
cheers,
hvr