From: Christophe Rhodes Date: Wed, 11 Dec 2013 20:49:56 +0000 (+0000) Subject: package fixup for cons specializers X-Git-Tag: els2014-submission~32 X-Git-Url: http://christophe.rhodes.io/gitweb/?a=commitdiff_plain;h=82c321875745956a207997994b4916614b22616e;p=specializable.git package fixup for cons specializers also note a problem with the current protocol --- diff --git a/cons-specializer.lisp b/cons-specializer.lisp index 70529d4..0c834f2 100644 --- a/cons-specializer.lisp +++ b/cons-specializer.lisp @@ -1,3 +1,5 @@ +(in-package "SPECIALIZABLE") + ;;;; CONS-SPECIALIZER example (defclass cons-specializer (extended-specializer) ((car :initarg :car :reader %car))) @@ -35,7 +37,8 @@ (eql (car obj) (%car specializer)))) ;;; but this one does: it doesn't look like it here, but at issue is ;;; who is responsible for the SPECIALIZER< method for two distinct -;;; user-defined specializers. +;;; user-defined specializers. Also consider a symbol generalizer +;;; being used to compare two class specializers. (defmethod specializer< ((s1 cons-specializer) (s2 cons-specializer) generalizer) (declare (ignore generalizer)) (if (eql (%car s1) (%car s2))