[Haskell-cafe] instance Monoid a => Monad ((,) a)

Neil Mayhew neil_mayhew at users.sourceforge.net
Fri Aug 2 23:48:52 UTC 2019

On 2019-08-02 5:38 p.m., Benjamin Franksen wrote:

    But I could not find the

    |instance Monoid a => Monad ((,) a)|

    documented anywhere in the base package.

If you look at the list of instances under the definition of |Monad|,
you’ll see |Monoid a => Monad ((,) a)| | /Since: in the list.
Clicking on the |# Source| link takes you to the source of |GHC.Base|:

|instance Monoid a => Monad ((,) a) where (u, a) >>= k = case k a of (v,
b) -> (u <> v, b) |

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20190802/f9ab86f8/attachment.html>

More information about the Haskell-Cafe mailing list