A Pointless Library Proposal

Simon Peyton-Jones simonpj at microsoft.com
Mon Oct 30 06:45:09 EST 2006

| > 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!


More information about the Libraries mailing list