<div dir="ltr">Fumiaka Kinoshita's instance actually seems both sound and "slightly more defined".<div><br></div><div>It even relates more obviously to the proposed Alternative, which can be seen as exploiting the fact that the First semigroup can be applied on any data type and then using this instance.</div><div><br></div><div><font face="monospace, monospace">m <|> n = fmap getFirst (fmap First m <> fmap First n)</font></div><div><br></div><div>-Edward</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jul 25, 2015 at 11:43 PM, M Farkas-Dyck <span dir="ltr"><<a href="mailto:strake888@gmail.com" target="_blank">strake888@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 26/07/2015 at 12:23:13 +0900, Fumiaki Kinoshita wrote:<br>
> There is another possible instance:<br>
><br>
> instance Semigroup a => Monoid (ZipList a) where<br>
>   mempty = ZipList []<br>
>   mappend (ZipList xs0) (ZipList ys0) = ZipList (mappend xs0 ys0) where<br>
>     go (x:xs) (y:ys) = x <> y : go xs ys<br>
>     go xs [] = xs<br>
>     go [] ys = ys<br>
<br>
</span>This breaks the identity law.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</div></div></blockquote></div><br></div>