;;; Dispatch on "normal types".
+(defconst cl--generic--unreachable-types
+ ;; FIXME: Try to make that list empty?
+ '(fixnum bignum boolean keyword
+ special-form subr-primitive subr-native-elisp)
+ "Built-in classes on which we cannot dispatch for technical reasons.")
+
(defun cl--generic-type-specializers (tag &rest _)
(and (symbolp tag)
(let ((class (cl--find-class tag)))
(and (symbolp type)
(not (eq type t)) ;; Handled by the `t-generalizer'.
(let ((class (cl--find-class type)))
+ (when (memq type cl--generic--unreachable-types)
+ (error "Dispatch on %S is currently not supported" type))
(memq (type-of class)
'(built-in-class cl-structure-class eieio--class)))
(list cl--generic-typeof-generalizer))