[Openmcl-devel] Docs on defpackage, in-package, use-package, provides and require

Peter Seibel peter at javamonkey.com
Tue Aug 17 16:20:25 PDT 2004


"Andrew P. Lentvorski, Jr." <bsder at mail.allcaps.org> writes:

> On Aug 16, 2004, at 8:24 PM, Hamilton Link wrote:
>
>> (in-package :cl-user)
>> (unless (find-package "CLOS-UNIT")
>>   (defpackage "CLOS-UNIT"
>>     (:nicknames :unit)
>>     (:export "API-FN1"
>>              "API-CLASS-FOO"
>>              "ETC.")) ; ... plus maybe some more API, and a
>> package-use list or import lists depending on the functionality that
>> clos-unit depends upon
>>   )
>>
>> (in-package :clos-unit)
>> ;; all your code for clos-unit goes here
>
> I seem to be having a problem with defpackage.

Actually you're having a problem with case conversion. (Sort of ironic
considering the domain name in your email address. ;-)) If you're
going to use strings in a DEFPACKAGE they should be all-upper case.
(You can actually see this in the results you get from APROPOS, the
|barzz| is Lisp's way of printing a symbol with lowercase letters in
its name such as you created by saying (:export "barzz") instead of
(export "BARZZ") in your DEFPACKAGE.

Some of these issues are discussed in Chapter 17 of my upcoming book
about Common Lisp, a draft of which is available on the web at:

  <http://www.gigamonkeys.com/book/programming-in-the-large-packages-and-symbols.html>

If you take a look at that, please let me know if it help you out at
all.

-Peter

-- 
Peter Seibel                                      peter at javamonkey.com

         Lisp is the red pill. -- John Fraser, comp.lang.lisp



More information about the Openmcl-devel mailing list