Re: package "CLOS" not found
- From: Pascal Costanza <pc@xxxxxxxxx>
- Date: Fri, 30 Jun 2006 09:14:21 +0200
Dmitry Gorbatovsky wrote:
I am trying to compile (sbcl,debian)
this code (from "screamer+.lisp" ):
(defun slot-names-of (obj)
(mapcar #'(lambda(x) (slot-value x 'CLOS::NAME))
(clos::class-slots (class-of obj))))
and get an error :
package "CLOS" not found.
The code uses features of the CLOS MOP here. Since the CLOS MOP is not part of ANSI Common Lisp, the symbols that name CLOS MOP functionality cannot be part of the common-lisp package (ANSI Common Lisp forbids such extensions of the common-lisp package). Therefore, implementations have to be put these symbols in another package. Unfortunately, the CLOS MOP doesn't specify a package name for its symbols, so every implementation has its own idea where to put the package. Typical names are "CLOS", "MOP", "CLOS-MOP" or some more implementation-specific name.
A good way to find the right package is to do an (apropos "CLASS-SLOTS") (or an apropos on some other CLOS MOP identifier), and/or check out the documentation of the respective implementation. Another way is to use the Closer to MOP library which, apart from fixing some compatibility issues, provides a common package name for all implementations. See http://common-lisp/project/closer
Pascal
--
3rd European Lisp Workshop
July 3 - Nantes, France - co-located with ECOOP 2006
http://lisp-ecoop06.bknr.net/
.
- Follow-Ups:
- Re: package "CLOS" not found
- From: Dmitry Gorbatovsky
- Re: package "CLOS" not found
- References:
- package "CLOS" not found
- From: Dmitry Gorbatovsky
- package "CLOS" not found
- Prev by Date: Re: Very confused about packages.
- Next by Date: What language could be written "Matrix"
- Previous by thread: package "CLOS" not found
- Next by thread: Re: package "CLOS" not found
- Index(es):
Relevant Pages
|