From: Tamas K Papp
Subject: defgeneric incompatible lambda list
Date: 
Message-ID: <6m8tfbFfjlofU1@mid.individual.net>
Hi,

I defined a generic method

(defgeneric plot-p-w-frequency (frame object))

and later decided an extra argument would come handy, so I modified it to

(defgeneric plot-p-w-frequency (frame object &key p-bar))

When compiled, SBCL complains that

The lambda-list (FRAME OBJECT &KEY
                 P-BAR) is incompatible with existing methods of 
#<STANDARD-GENERIC-FUNCTION PLOT-P-W-FREQUENCY (2)>.
   [Condition of type SIMPLE-ERROR]

Restarts:
 0: [ABORT] Return to SLIME's top level.
 1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "worker" RUNNING 
{D34DA01}>)

Is there a quick fix that would allow me to proceed?

Thanks,

Tamas
From: Rainer Joswig
Subject: Re: defgeneric incompatible lambda list
Date: 
Message-ID: <joswig-5EDCF4.17300622102008@news-europe.giganews.com>
In article <··············@mid.individual.net>,
 Tamas K Papp <······@gmail.com> wrote:

> Hi,
> 
> I defined a generic method
> 
> (defgeneric plot-p-w-frequency (frame object))
> 
> and later decided an extra argument would come handy, so I modified it to
> 
> (defgeneric plot-p-w-frequency (frame object &key p-bar))
> 
> When compiled, SBCL complains that
> 
> The lambda-list (FRAME OBJECT &KEY
>                  P-BAR) is incompatible with existing methods of 
> #<STANDARD-GENERIC-FUNCTION PLOT-P-W-FREQUENCY (2)>.
>    [Condition of type SIMPLE-ERROR]
> 
> Restarts:
>  0: [ABORT] Return to SLIME's top level.
>  1: [TERMINATE-THREAD] Terminate this thread (#<THREAD "worker" RUNNING 
> {D34DA01}>)
> 
> Is there a quick fix that would allow me to proceed?
> 
> Thanks,
> 
> Tamas

Most/many implementations will have a restart that removes the methods
and then executes the DEFGENERIC.

Maybe you could just undefine the function before and then
run the DEFGENERIC. See you IDE for undefining functions
or use FMAKUNBOUND.

CL-USER 38 : 1 > (documentation 'FMAKUNBOUND 'function)
"FUNCTION-NAME must be a function name.  This name is made
undefined, removing any function definition it may currently have."

-- 
http://lispm.dyndns.org/