If we look at swap from the standpoint of the laws/RULES it should support, viewing Hask over (,) as a symmetric monoidal category you get something like:<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br>
</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">{-# RULES</font><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">&quot;swap . swap = id&quot; forall x. swap (swap x) = x</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">&quot;fst . swap = snd&quot; forall x. fst (swap x) = snd x</font></div><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">&quot;snd . swap = fst&quot; forall x. snd (swap x) = fst x</font></div>
<div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"> #-}</font></div><div><br></div><div>That seems to argue for the lazy definition being the default to avoid the strict pattern match in swap breaking the latter very pleasing equalities.</div>
<div><br></div><div>-Edward Kmett</div><div><br><div class="gmail_quote">On Wed, Jun 17, 2009 at 8:52 PM,  <span dir="ltr">&lt;<a href="mailto:roconnor@theorem.ca">roconnor@theorem.ca</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
How about this: swap should be lazy because that is how H98 defines uncurry:<br>
<br>
uncurry          :: (a -&gt; b -&gt; c) -&gt; ((a, b) -&gt; c)<br>
uncurry f p      =  f (fst p) (snd p)<div class="im"><br>
<br>
-- <br>
Russell O&#39;Connor                                      &lt;<a href="http://r6.ca/" target="_blank">http://r6.ca/</a>&gt;<br>
``All talk about `theft,&#39;&#39;&#39; the general counsel of the American Graphophone<br>
Company wrote, ``is the merest claptrap, for there exists no property in<br>
ideas musical, literary or artistic, except as defined by statute.&#39;&#39;<br>
_______________________________________________<br></div><div><div></div><div class="h5">
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
</div></div></blockquote></div><br></div></div>