
30 Oct
2006
30 Oct
'06
6:45 a.m.
| > magic :: Zero -> a | > magic _ = error "There's magic, as no such thing!" | | It's a little frustrating to have to define this function lazily. I | prefer the strict definition with no lines, but it isn't valid | Haskell! 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. If anyone is keen on this, pls create a Trac feature request, and fill out the details (e.g. what flags, what should the warning look like..). Better still do that, and submit a patch! Simon