> Please find attached a proposal to improve error handling in > `cl-types-of'.  Ultimately, I think you were right and it is better to > simply report derived type errors to the caller and abort processing, > but while also preventing their recurrence as much as possible :-) > > So my proposal is to still handle any error on a derived type, in > order to disable the type as is currently done by removing it from the > list of types; but, instead of warn, raise a new `cl-type-error' > mentioning the type in error and the underlying error.  Here are some > simple examples for you to observe the result. > > (cl-deftype T1 () >   '(satisfies plusp)) > > (cl-types-of -0.5) > => (real float number number-or-marker atom t) > > (cl-types-of 12) > => (T1 real base-char character fixnum natnum integer number integer-or-marker number-or-marker atom t) > > (cl-types-of "12") > => Error on derived type: T1, (wrong-type-argument number-or-marker-p "12") > > (cl-deftype T2 () >   `(satisfies ,(lambda (o) (memq 'T1 (cl-types-of o))))) > > (cl-types-of "12") > => Error on derived type: T2, (excessive-lisp-nesting 1601) > > Does it make sense? Please find attached a better patch, and a possible change log below. Thanks David 2025-05-19 David Ponce Signal a `cl-type-error' instead of warning when a derived type encounters an error. * lisp/emacs-lisp/cl-extra.el (cl-type-error): New error symbol. (cl-types-of): Use it.