[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] Issue on in-package from gcl-2.4.4 to gcl-2.5.2, correct
Paul F. Dietz
Re: [Gcl-devel] Issue on in-package from gcl-2.4.4 to gcl-2.5.2, correct fix? where to dig?
Sat, 26 Apr 2003 10:47:42 -0500
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225
David MENTRE wrote:
The advice from tim is to change each (in-package ...) in
"(make-package ...) (in-package ...)".
Is it the right fix for gcl-2.5.2?
In an attempt to apply this fix, I observed a strange behaviour (to me
;-) that I could not explain :
If I do:
gcl> (compile-file "/path-to/boothdr.lisp" :output-file "/tmp/boothdr.o")
it fails on (in-package ...) S-expr.
I don't know if this is your problem, but it often has come up elsewhere.
IN-PACKAGE has also been changed to be a macro that does NOT evaluate
its argument, so if the argument was a quoted symbol it will not work.
(in-package 'foo) should be changed to one of:
(in-package "FOO"), or
(in-package :foo), or
(the keyword symbols evaluate to themselves, so they need not be
Note that symbols that print in lower case are stored internally in
upper case, so (in-package "foo") is wrong.
IN-PACKAGE also does not create the package. You should use DEFPACKAGE
for that, not MAKE-PACKAGE. If you are compiling the file the MAKE-PACKAGE
expression will only be evaluated when you load the fasl file, which is
probably not what you want. Expressions at the top level may need
an EVAL-WHEN form to be evaluated at compile time (those various DEF* macros
often expand to forms that have an EVAL-WHEN wrapper.)
I usually put the DEFPACKAGE form in another file, btw.