<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">Out of curiosity, what ever happened to the proposal a while back to refactor the Num class etc so that the operations would be grouped according to what abstract algebra notions they correspond to?<br>My understanding was that doing this would make haskell numerics much more sensible. Eg array indexing could be done by any type that is isomorphic to natural numbers etc.<br><br>cheers,<br>-Carter<br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Original Message ----<br>From: Lennart Augustsson &lt;lennart@augustsson.net&gt;<br>To: Bulat Ziganshin &lt;Bulat.Ziganshin@gmail.com&gt;<br>Cc: haskell-cafe@haskell.org<br>Sent: Thursday, July 12, 2007 4:14:31 PM<br>Subject: Re: Re[2]: [Haskell-cafe]
 Number overflow<br><br>Of course you should be able to specify what types you want.&nbsp; But it would be nice if the default was correct rather than fast.<br><br><div><span class="gmail_quote">On 7/12/07, <b class="gmail_sendername">Bulat Ziganshin</b>
 &lt;<a rel="nofollow" target="_blank" href="mailto:bulat.ziganshin@gmail.com">bulat.ziganshin@gmail.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello Thomas,<br><br>Thursday, July 12, 2007, 3:14:57 AM, you wrote:<br>&gt; The differences between Int and Integer operations are mostly constant factors.<br><br>well, i will be unlucky if in my real-world program Integers would be
<br>used instead of Ints. defaulting provides a great way to solve this<br>dilemma, so good-for-anyone approach may be: default defaulting to<br>Integer instead of Int, and use (Num a) instead of Int in all standard<br>functions such as length. with jhc-like automatic specialization
<br>feature this should provide enough speed<br><br>--<br>Best regards,<br> Bulat&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;mailto:<a rel="nofollow" target="_blank" href="mailto:Bulat.Ziganshin@gmail.com">Bulat.Ziganshin@gmail.com</a><br><br>_______________________________________________
<br>Haskell-Cafe mailing list<br><a rel="nofollow" target="_blank" href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br><a rel="nofollow" target="_blank" href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe
</a><br></blockquote></div><br>
<div>_______________________________________________<br>Haskell-Cafe mailing list<br>Haskell-Cafe@haskell.org<br><a target="_blank" href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br></div></div><br></div></div></body></html>