Comment 2 for bug 1429520

Revision history for this message
Douglas Katzman (dougk) wrote :

It should be at least a warning, if not an error, when the type can't be parsed at the time of call to set-pprint-dispatch.

If it's "only" a warning, we could do something extremely clever by having dispatch entries marked as 'disabled' so that they allow installation but silently do nothing. Subsequent changes to the type system (via defstruct, defclass, deftype) can trigger re-evaluation of the type constraints on pprint dispatch entries.

But really I think we should just refuse to install the dispatch entry, because while it is not undefined per se, it is pretty clear that it will lead to prohibited behavior: TYPEP says "The consequences are undefined if the type-specifier is not a type specifier."
And the behavior of the pprint-dispatch is more-or-less to invoke TYPEP although it doesn't say that in those words.