NextPrevUpTopContentsIndex

7.2.1 Canonical dspecs

Internally, dspecs are handled in the canonical form:

( dspec-class primary-name . qualifiers )

where dspec-class in the canonical name of the class, and qualifiers is a proper list. primary-name is typically a symbol, but can be a list (in the case of a setf function) or a string (in the case of a package). The equality for canonical dspecs is equal .

As an example the general form of a defmethod dspec is:

(defmethod
 name
 qualifiers
 (specializer
*))
 
name
       := symbol
 | (setf symbol
)
qualifiers
   := qualifier
 | (qualifier
 qualifier
*)
qualifier
    := symbol
specializer
  := symbol
 | (eql object
)

Functions in the dspec API accept non-canonical dspecs. All dspec functions, except dspec:prettify-dspec, dspec:find-dspec-locations , dspec:name-definition-locations , dspec:dspec-definition-locations and dspec:find-name-locations return canonical dspecs.


LispWorks User Guide - 7 Jul 2004

NextPrevUpTopContentsIndex