
30 Oct
2006
30 Oct
'06
9:38 a.m.
Simon Peyton-Jones wrote:
I've occasionally wondered about emitting a warning, but not an error, when there's a type signature for a function but no definition. The compiler could automatically generate an error message stub implementation, much as it does for an incomplete pattern match, of which this is an extreme example.
I don't like this idea because the necessary stub is different for different numbers of arguments, and there's no way to tell how many arguments the programmer intended. I do like the idea of allowing empty case expressions, though, and I don't think that even a warning would be necessary. -- Ben