
24 Aug
2011
24 Aug
'11
1:54 a.m.
On Wed, Aug 24, 2011 at 10:47 AM, Ivan Lazar Miljenovic
On 24 August 2011 11:10, bob zhang
wrote: Hi, John, there is a space leak problem in ListLike typeclass, in the method genericLength calclen !accum cl = calclen accum cl =
I _think_ this may cause problems with some data types (e.g. http://hackage.haskell.org/packages/archive/numbers/2009.8.9/doc/html/Data-N... ) that require the extra laziness (that is, you can do things like ` 3 < genericLength [1..] ' and have it return True).
Does the current version support this? The use of an accumulator (that is presumably returned after consuming the complete input) seems to suggest that your example would diverge anyway (but I did not try). Sebastian