[Haskell-cafe] a minor bug (memory leak) in ListLike package

Ivan Lazar Miljenovic ivan.miljenovic at gmail.com
Wed Aug 24 08:47:21 CEST 2011

On 24 August 2011 15:54, Sebastian Fischer <fischer at nii.ac.jp> wrote:
>> 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-Number-Natural.html
>> ) 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).

I was just trying to remember some of the tricks Daniel Peebles (aka
{co}pumpkin) used to do in #haskell with Data.List.genericLength.
I've never really used ListLike, but was just trying to guess why the
default implementation was as it is.

Ivan Lazar Miljenovic
Ivan.Miljenovic at gmail.com

More information about the Haskell-Cafe mailing list