<p>This is interesting because it seems to be a counterexample to the claim that you can lift any Num through an Applicative (ZipList, in this case). It seems like maybe that only works in general for monoids instead of rings?</p>

<div class="gmail_quote">On Mar 25, 2012 8:43 PM, &quot;Chris Smith&quot; &lt;<a href="mailto:cdsmith@gmail.com">cdsmith@gmail.com</a>&gt; wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Jerzy Karczmarczuk &lt;<a href="mailto:jerzy.karczmarczuk@unicaen.fr">jerzy.karczmarczuk@unicaen.fr</a>&gt; wrote:<br>
&gt; Le 26/03/2012 01:51, Chris Smith a écrit :<br>
&gt;<br>
&gt;&gt;     instance (Num a) =&gt; Num [a] where<br>
&gt;&gt;         xs + ys = zipWith (+) xs ys<br>
&gt;&gt;<br>
&gt;&gt; You can do this in the sense that it&#39;s legal Haskell... but it is a bad idea [...]<br>
<br>
&gt; It MIGHT be a ring or not. The &quot;real problem&quot; is that one should not confuse<br>
&gt; structural and algebraic (in the &quot;classical&quot; sense) properties of your<br>
&gt; objects.<br>
<br>
Of course there are rings for which it&#39;s possible to represent the<br>
elements as lists.  Nevertheless, there is definitely not one that<br>
defines (+) = zipWith (+), as did the one I was responding to.  By the<br>
time you get a ring structure back by some *other* set of rules,<br>
particularly for multiplication, the result will so clearly not be<br>
anything like a general Num instance for lists that it&#39;s silly to even<br>
be having this discussion.<br>
<br>
--<br>
Chris Smith<br>
<br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div>