[armedbear-devel] Package redefinition issue in REPL.

wl chiu wlclive at live.com
Thu Apr 26 03:39:24 UTC 2012




----------------------------------------
> From: xach at xach.com
> To: wlclive at live.com
> CC: armedbear-devel at common-lisp.net
> Subject: Re: [armedbear-devel] Package redefinition issue in REPL.
> Date: Wed, 25 Apr 2012 07:01:07 -0400
>
> wl chiu <wlclive at live.com> writes:
>
> > Hello dear developers,
> >
> > I' just experienced an odd issue with defpackage. It looked like the package
> > will not be modified if I call defpackage again.
> >
> > For example, I define a package called "a-package". After a while I wanted to
> > export a function that I've just implemented called "a-new-foo". Naturally I
> > would add a new entry under the :export section of defpackage, and then eval
> > the expression again. However, I still cannot access "a-new-foo" as the REPL
> > gives me "such symbol is not external of package [a-package]" error message.
> >
> > Please advice and many thanks,
>
> I don't know what the intent of ABCL is, but this behavior is allowed by
> the specification of DEFPACKAGE:
>
> If defined-package-name already refers to an existing package, the
> name-to-package mapping for that name is not changed. If the new
> definition is at variance with the current state of that package,
> the consequences are undefined; an implementation might choose to
> modify the existing package to reflect the new definition.
>
> You can modify the export status of a symbol reliably at runtime with
> the EXPORT function.
>
> Zach

Thank you very much!  I guess for now I have to rely on the function "export" during the development.  I do hope one day the modification behavior will be implemented :)
Best regards,
Wei-Lun Chiu   		 	   		  



More information about the armedbear-devel mailing list