
23 Aug
2011
23 Aug
'11
11:37 p.m.
On 24 August 2011 13:17, bob zhang
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 Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com