On 24 August 2011 13:17, bob zhang <[email protected]> wrote: > Hi, > I think 3 < genericLength [1..] should fail, that laziness is not we > want.
It might not be what _you_ want, but it might be what others want. If you're concerned with efficiency, then wouldn't you use length rather than genericLength? > I can not derive ListLike instance using GHC extensions, can you provide > a working example? I take it back, it doesn't seem to be possible due to the design of ListLilke. You need to define the instance explicitly (there are only four functions you have to define, but for performance reasons you probably want to re-define all of them). -- Ivan Lazar Miljenovic [email protected] IvanMiljenovic.wordpress.com _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
