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 :)
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to