You can make numeric class instances from arbitrary Applicatives [1]. I imagine a lot of them (e.g. Stream) would want at least some non-strictness. We might provide strict alternatives for sum and product. I wonder what else.<br>
<br>[1] <a href="http://hackage.haskell.org/cgi-bin/hackage-scripts/package/applicative-numbers">http://hackage.haskell.org/cgi-bin/hackage-scripts/package/applicative-numbers</a><br><br>- Conal<br><br><div class="gmail_quote">
On Sat, Jun 13, 2009 at 7:03 AM, Keith Sheppard <span dir="ltr"><<a href="mailto:keithshep@gmail.com">keithshep@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Is there any reason that sum isn't strict? I can't think of any case<br>
where that is a good thing.<br>
<br>
Prelude> sum [0 .. 1000000]<br>
*** Exception: stack overflow<br>
<br>
-Keith<br>
<font color="#888888">--<br>
<a href="http://keithsheppard.name" target="_blank">keithsheppard.name</a><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>
</font></blockquote></div><br>