[closer-devel] Re: [Ecls-list] Closer to MOP for ecl
Greg Pfeil
sellout42 at mac.com
Thu May 11 11:39:02 UTC 2006
On 11 May 2006, at 11:15, Gary King wrote:
> I'm not sure what to do. Some Lisps (such as OpenMCL and SBCL) define
> eql-specializer as a class. Others (such as LispWorks) do not
> (AFAICT). Also, I don't see eql-specializer-p being exported or
> defined in Closer to MOP. It's used in ECL and LispWorks but not
> defined.
In the current darcs for Closer-MOP, I see this in ecl/closer-mop.lisp:
(defun eql-specializer-p (cons)
(and (consp cons)
(eq (car cons) 'eql)
(null (cddr cons))))
(deftype eql-specializer ()
'(or eql-specializer*
(satisfies eql-specializer-p)))
(cl:defgeneric eql-specializer-object (eql-specializer)
(:method ((cons cons)) (if (eql-specializer-p cons)
(cadr cons)
(error "~S is not an eql-specializer." cons))))
and a few other definitions. I didn't look at it for other impls,
though.
I just changed the version in Moptilities to what was in your last
mail, and now I'm back to the cl-containers error I was getting
yesterday:
;;; Compiling (DEFCLASS CONTENTS-AS-HASHTABLE-MIXIN ...).
;;; Warning: Class KEY-VALUE-ITERATABLE-CONTAINER-MIXIN has been
forward referenced.
There is no method on the generic function CONTENTS that agrees on
qualifiers NIL and specializers (#<The STANDARD-CLASS
CONTENTS-AS-HASHTABLE-MIXIN>)
Broken at LAMBDA.
which I'm going to consider a good thing ;) Continuing our conversation
from IRC ... I don't see a problem with the defclass at all ... it
seems like ECL is seeing the :accessor argument, and looking up the
method as opposed to defining it. I'm not sure why this is, as other
DEFCLASS* forms are behaving.
(defclass* contents-as-hashtable-mixin (uses-contents-mixin
key-value-iteratable-container-mixin
findable-container-mixin)
((contents :unbound :accessor contents) ;; unbound for
make-ht-for-container
))
More information about the ecl-devel
mailing list