<div dir="auto">With the instances Ryan suggests, the type seems to belong to Control.Applicative rather than Data.Monoid.</div><br><div class="gmail_quote"><div dir="ltr">On Wed, Apr 11, 2018, 1:25 PM Ryan Scott <<a href="mailto:ryan.gl.scott@gmail.com">ryan.gl.scott@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">One thing that is not clear to me: is this Ap type intended to be a<br>
catch-all for defining instances that are "lifted" through an<br>
Applicative? Or are you deliberately restricting that to the Semigroup<br>
and Monoid instances? For instance, I noticed that you currently<br>
derive Ap's Eq, Ord, Read, and Show instances, which would give:<br>
<br>
    instance Eq (f a) => Eq (Ap f a)<br>
    instance Ord (f a) => Ord (Ap f a)<br>
    instance Read (f a) => Read (Ap f a)<br>
    instance Show (f a) => Show (Ap f a)<br>
<br>
Would you not want this instead, to be in line with the Semigroup and<br>
Monoid instances?<br>
<br>
    instance (Applicative f, Eq a) => Eq (Ap f a)<br>
    instance (Applicative f, Ord a) => Ord (Ap f a)<br>
    instance (Applicative f, Read a) => Read (Ap f a)<br>
    instance (Applicative f, Show a) => Show (Ap f a)<br>
<br>
I would be fine with either option, but if we should be clear about<br>
Ap's intentions when we end up documenting it.<br>
<br>
Ryan S.<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank" rel="noreferrer">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>