foundation icon indicating copy to clipboard operation
foundation copied to clipboard

Monoid instance of Maybe unnecessarily restrictive

Open bmabsout opened this issue 7 years ago • 1 comments

Monoid a => Monoid (Maybe a) should be Semigroup a => Monoid (Maybe a) Even the Documentation next to the instance says only a semigroup is needed

bmabsout avatar Jun 02 '18 08:06 bmabsout

This looks like it is due to Monoid being reexported from base. If you are on the most recent version of foundation, it will use [email protected] which generalized the Maybe instance of Monoid to only require a Semigroup in its type argument.

ProofOfKeags avatar Jul 16 '18 01:07 ProofOfKeags