[Openmcl-devel] defmethod congruency checks

Pascal Costanza pc at p-cos.net
Fri Sep 18 02:43:52 PDT 2009


Hi,

Clozure Common Lisp seems to be too eager in its checking of  
congruency of generic function lambda lists and those of their methods.

Consider the following example:

? (defgeneric foo (a b c))
#<STANDARD-GENERIC-FUNCTION FOO #x30004125B93F>
? (add-method
    #'foo
    (make-instance 'standard-method
      :qualifiers '()
      :specializers (list (find-class 't) (find-class 't) (find-class  
't))
      :lambda-list '(a b c)
      :function (lambda (&rest args) (print args))))
 > Error: Lambda list of method #<STANDARD-METHOD NIL (T T T)>
 >        is incompatible with that of the generic function FOO.
 >        Method's lambda-list : (A B C)
 >        Generic-function's   : (A B C)
 >
 > While executing: CCL::CHECK-DEFMETHOD-CONGRUENCY, in process  
listener(1).

Indeed, check-defmethod-congruency uses the method-function to check  
for congruency, while it should actually use method-lambda-list for  
that purpose (at least in non-standard cases).

As far as I can tell at the moment, this is the only remaining step so  
that I can provide compatibility in Closer to MOP of the generic  
function invocation protocol to the specification in AMOP.


Best,
Pascal

-- 
Pascal Costanza, mailto:pc at p-cos.net, http://p-cos.net
Vrije Universiteit Brussel
Software Languages Lab
Pleinlaan 2, B-1050 Brussel, Belgium









More information about the Openmcl-devel mailing list