As a relative novice who's been bitten by these things, I'd like to
second the request for more detailed "program error" messages.
When the question was last raised on comp.lang.functional, I think it
sort of concluded with a suggestion to add an 'error' case to some
Prelude functions, e.g instead of Hugs' Prelude head:
head :: [a] -> a
head (x:_) = x
we can use:
head :: [a] -> a
head [] = error "Error: taking the 'head' of an empty list"
head (x:_) = x
A compiler is of course free (and probably even encouraged) to provide
warnings for programs that can be proven to produce an 'error'.
Possibly also warn about functions where implicit constraints are laid
on its parameters to avoid 'error'.
A nice environment should also provide as much context as possible
(i.e. the call stack/evaluation tree whatchamacallit). Is t here a
nice environment?
PS: Note that take already does bomb out if given a negative argument.
-kzm
--
If I haven't seen further, it is by standing in the footprints of giants