<div dir="ltr"><span style="font-size:12.8000001907349px">>We could as well use the Monoid list implementation for ZipLists.</span><br><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">We could, but that would be redundant and wouldn't fit what ZipList is for as well.</span></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 25, 2015 at 3:57 PM, Henning Thielemann <span dir="ltr"><<a href="mailto:lemming@henning-thielemann.de" target="_blank">lemming@henning-thielemann.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On Sat, 25 Jul 2015, Christopher Allen wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<a href="http://hackage.haskell.org/package/base-4.8.1.0/docs/Control-Applicative.html#t:ZipList" rel="noreferrer" target="_blank">http://hackage.haskell.org/package/base-4.8.1.0/docs/Control-Applicative.html#t:ZipList</a><br>
<br>
There's a Monoid that matches what the Applicative for ZipList does that seems to be missing.<br>
<br>
instance Monoid a => Monoid (ZipList a) where<br>
mempty = pure mempty<br>
mappend = liftA2 mappend<br>
<br>
It's been brought up before:<br>
<br>
<a href="https://mail.haskell.org/pipermail/haskell-cafe/2009-October/067861.html" rel="noreferrer" target="_blank">https://mail.haskell.org/pipermail/haskell-cafe/2009-October/067861.html</a><br>
<br>
Not only is it useful when it's the Monoid you want, but it serves an educational purpose for highlighting the relationship between Monoid and Applicative as well.<br>
<br>
Are there any good reasons not to have it?<br>
</blockquote>
<br></span>
The Monoid instance for lists is not related to Applicative list instance - so why should the instances for ZipList? We could as well use the Monoid list implementation for ZipLists. If there is no actual application for the instance I would leave it unimplemented.</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div dir="ltr">Chris Allen<br><div><span style="font-size:12.8000001907349px">Currently working on </span><a href="http://haskellbook.com" target="_blank">http://haskellbook.com</a></div></div></div></div></div></div>
</div>