Monoid Instance for ReaderT
Andrew Martin
andrew.thaddeus at gmail.com
Tue Nov 28 21:38:10 UTC 2017
This is also how the Monoid instance of basically everything with an
Applicative instance is defined. The only one that I feel should differ
from the others is Maybe, and that's getting fixed when Semigroup becomes a
superclass of Monoid.
On Tue, Nov 28, 2017 at 2:22 PM, M Farkas-Dyck <m.farkasdyck at gmail.com>
wrote:
> On 28/11/2017, Andrew Martin <andrew.thaddeus at gmail.com> wrote:
> > instance (Applicative m, Monoid a) => Monoid (ReaderT r m a)
>
> > I believe there is good reason to prefer the first instance over the
> other
> > two.
>
> +1
>
> This is also how the `Monoid` instance of `(->)` is defined.
>
--
-Andrew Thaddeus Martin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20171128/1b1c91bc/attachment-0001.html>
More information about the Libraries
mailing list