GNU bug report logs -
#77725
31.0.50; Add support for types accepted by `cl-typep' to cl-generic?
Previous Next
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
>
> 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'.
See attached my current local changes as a diff w.r.t. the `scratch/cl-types` branch.
And a possible change log:
2025-05-02 David Ponce <da_vid <at> orange.fr>
Stefan Monnier <monnier <at> iro.umontreal.ca>
* 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'.
(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.
Thanks!
David
[cl-types.patch (text/x-patch, attachment)]
This bug report was last modified 10 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.