<div dir="ltr">I'm not quite sure what the point of MonadPlus is; the default definitions are the Alternative methods. Would we ever want to have MonadPlus different from Alternative?</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">2019年4月2日(火) 13:44 David Feuer <<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>>:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">I think the MonadPlus instance should probably have a MonadPlus constraint, since MonadPlus makes a sort of statement about the interaction between >>= and mplus, even if it's a bit of an ambiguous one.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 2, 2019, 12:30 AM Fumiaki Kinoshita <<a href="mailto:fumiexcel@gmail.com" target="_blank">fumiexcel@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>This is another part of <a href="https://gitlab.haskell.org/ghc/ghc/merge_requests/644" rel="noreferrer" target="_blank">https://gitlab.haskell.org/ghc/ghc/merge_requests/644</a>, which is presumably much less controversial:<br class="gmail-m_2283829270033984104m_53381447158382037gmail-Apple-interchange-newline"><br></div><div>Generic (Kleisli m a b)</div><div><code><span class="gmail-m_2283829270033984104m_53381447158382037gmail-kt">Functor</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-n">m</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-o">=></span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-kt">Functor</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-p">(</span><span class="gmail-m_2283829270033984104m_53381447158382037gmail-kt">Kleisli</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-n">m</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-n">a</span><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p">)</span></code><br></div><div><code><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p"><code><span class="gmail-m_2283829270033984104m_53381447158382037gmail-kt">Applicative</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-n">m</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-o">=></span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-kt">Applicative</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-p">(</span><span class="gmail-m_2283829270033984104m_53381447158382037gmail-kt">Kleisli</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-n">m</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-n">a</span><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p">)</span></code><br></span></code></div><div><code><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p"><code><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p"><code><span class="gmail-m_2283829270033984104m_53381447158382037gmail-kt">Alternative</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-n">m</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-o">=></span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-kt">Alternative</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-p">(</span><span class="gmail-m_2283829270033984104m_53381447158382037gmail-kt">Kleisli</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-n">m</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-n">a</span><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p">)</span></code><br></span></code></span></code></div><div><code><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p"><code><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p"><code><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p"><code><span class="gmail-m_2283829270033984104m_53381447158382037gmail-kt">Monad</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-n">m</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-o">=></span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-kt">Monad</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-p">(</span><span class="gmail-m_2283829270033984104m_53381447158382037gmail-kt">Kleisli</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-n">m</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-n">a</span><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p">)</span></code><br></span></code></span></code></span></code></div><div><code><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p"><code><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p"><code><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p"><code><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p"><code><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p">(</span><span class="gmail-m_2283829270033984104m_53381447158382037gmail-kt">Alternative</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-n">m</span><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p">,</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-kt">Monad</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-n">m</span><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p">)</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-o">=></span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-kt">MonadPlus</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-p">(</span><span class="gmail-m_2283829270033984104m_53381447158382037gmail-kt">Kleisli</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-n">m</span> <span class="gmail-m_2283829270033984104m_53381447158382037gmail-n">a</span><span class="gmail-m_2283829270033984104m_53381447158382037gmail-p">)</span></code></span></code></span></code></span></code></span></code></div></div></div>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" rel="noreferrer" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>
</blockquote></div>