
24 Sep
2007
24 Sep
'07
4:54 p.m.
Wow, half an hour, about 7 replies :) I dont know which one to quote! Okay. So, why is GHC finding it difficult to conclude that length is always > 0? Suppose I define length like: length [] = 0 length (x:xs) = 1 + length xs Hmm, well, I think the fact that we, as humans, expecting GHC to infer length (any list) > 0 is pretty unfair :) What I had in mind was, when GHC was able to do so many things like pattern matching, data type inference, why not this! Nice! Now I dont know what to say :)