All Manuals > LispWorks User Guide and Reference Manual > 7 Dspecs: Tools for Handling Definitions > 7.2 Forms of dspecs

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 , find-dspec-locations, name-definition-locations, dspec-definition-locations and find-name-locations return canonical dspecs.


LispWorks User Guide and Reference Manual - 21 Dec 2011

NextPrevUpTopContentsIndex