Hi,
On 24 August 2011 11:10, bob zhang <bobzhang1988@gmail.com> wrote:I _think_ this may cause problems with some data types (e.g.
> Hi, John, there is a space leak problem in ListLike typeclass,
> in the method genericLength
> calclen !accum cl =
> calclen accum cl =
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).
GeneralizedNewtypeDeriving can do that.
> --- thank you for your nice library
> btw, is there any way to derive ListLike interface automatically?
> for such type :
> newtype List a = List {[a]}
--
Ivan Lazar Miljenovic
Ivan.Miljenovic@gmail.com
IvanMiljenovic.wordpress.com