Wanted: Make the condition reporter for TYPE-ERROR mention the TYPE-OF the datum
Currently, the condition reporter for TYPE-ERROR is not as helpful as it could be:
(funcall '(lambda (a b) (+ a b)) 1 2) ; Silly confused-newbie example...
"The value (LAMBDA (A B) (+ A B)) is not of type (OR FUNCTION SYMBOL)."
I'd suggest instead something like this:
"The value (LAMBDA (A B) (+ A B)) is not of type (OR FUNCTION SYMBOL).
(It is of type CONS.)"
The TYPE-OF the datum is of course only a rough indication, but I hope this example illustrates that it can sometimes give a helpful hint as to what the problem might be.