Christophe Weblog Wiki Code Publications Music
new protocol function GENERALIZER-EQUAL-HASH-KEY
[specializable.git] / cons-specializer.lisp
index 3922a6abd59c09c4f6daf1321fd3f129bd8a621b..4540b5f195fbaa41b4d6fb8374739313c638ec20 100644 (file)
@@ -9,7 +9,6 @@
 
 (define-extended-specializer cons (gf car)
   (make-instance 'cons-specializer :car car))
-
 (defmethod sb-pcl:unparse-specializer-using-class
     ((gf cons-generic-function) (specializer cons-specializer))
   `(cons ,(%car specializer)))
@@ -17,6 +16,9 @@
     ((s1 cons-specializer) (s2 cons-specializer))
   (eql (%car s1) (%car s2)))
 
+(defmethod generalizer-equal-hash-key ((gf cons-generic-function) (g symbol))
+  g)
+
 (defmethod generalizer-of-using-class ((gf cons-generic-function) arg)
   (typecase arg
     ((cons symbol) (car arg))