gcl-devel
[Top][All Lists]
Advanced

[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


From: David MENTRE
Subject: Re: [Gcl-devel] Issue on in-package from gcl-2.4.4 to gcl-2.5.2, correct fix? where to dig?
Date: 11 May 2003 18:44:30 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

Hello Paul,

I've tried today to tackle this IN-PACKAGE issue on Axiom's code and
failed.

"Paul F. Dietz" <address@hidden> writes:

> (in-package 'foo) should be changed to one of:
> 
>    (in-package "FOO"), or
>    (in-package :foo), or
>    (in-package :FOO)

I've done that for all s-expressions using IN-PACKAGE.

> 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.)

Ok. It's clear to me. However, this created warnings.

I've done:
(defpackage "BOOTTRAN")  ;;; <-- I changed the make-package into defpackage

(PROVIDE 'BOOTTRAN)
(in-package "BOOTTRAN" :USE '(LISP USER SYSTEM))


At compilation time, I have:
Compiling boothdr.lisp.
; (PROVIDE 'BOOTTRAN) is being compiled.
;; Warning: The package operation (PROVIDE 'BOOTTRAN) was in a bad place.
; (IN-PACKAGE "BOOTTRAN" ...) is being compiled.
;; Warning: The package operation (IN-PACKAGE "BOOTTRAN" :USE
                                      '(LISP USER SYSTEM)) was in a bad place.


Why those warnings?

> I usually put the DEFPACKAGE form in another file, btw.

Could you show me an example of making a DEFPACKAGE in another file and
loading it? Camm advised me to look into clcs/ and pcl/ directories but
I found no use of DEFPACKAGE there. grep'ing all gcl sources, the only
uses of DEFPACKAGE I found were in ansi-tests/ directory. And by quickly
browsing them, I found no use of separate definition & loading of
packages.

Best regards,
david
-- 
 address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]