On 2025-05-02 11:24, David Ponce wrote: >> >> Please find attached a version of cl-types.el with my first try at >> implementing something related to your idea above to populate a >> `cl--type-dispatch-list' from `cl-generic-generalizers'. > Sorry, here is the correct patch, and updated change log. 2025-05-02 David Ponce Stefan Monnier * lisp/emacs-lisp/cl-types.el (cl--type-list): Doc string. (cl--type-dispatch-list): New variable. (cl--type-parents): Make it a plain defun. (cl--type-children, cl--type-dag): Remove. (cl--type-undefine): Remove duplicate test for `cl--type-p'. Use `cl--class-children'. Clear `cl--type-flag' instead of `cl--type-error'. Also remove type from the dispatch list. (cl--type-deftype): Doc string. Remove useless safeguard of data on error. Fix some error messages. Clear `cl--type-flag' when a type is (re)defined. Just push new types on `cl--type-list'. (cl--type-error): Set `cl--type-flag' to the symbol `error' and remove type in error from the dispatch list. (cl-types-of): Doc string. Remove useless check for `cl-type-class-p'. Skip types which we are sure will not match. Simplify creation of the DAG. (cl--type-generalizer): In the tagcode-function, check only types that can be dispatched. (cl-generic-generalizers): Populate the dispatch list.