When one definition form simply macroexpands into another, or otherwise has an identical effect as far as the dspec system is concerned, the dspec system should consider them variant forms of the same class.
Use define-dspec-alias to convert one definer to the other during canonicalization. A pre-defined example of this in LispWorks is
. These cannot be distinguished (other than in the source code), so
has been defined as a dspec alias for
are distinct kinds of variable, since we can easily tell which type of definition is in effect by calling the function
. To define their dspecs, LispWorks creates a dspec class called
and uses it as the superspace argument when defining the
As an explicit example, suppose you have a defining macro
(defmacro parameterdef (value name)
`(defparameter ,name ,value))
(dspec:define-dspec-alias parameterdef (value name)
would be a suitable appropriate alias definition. This define-dspec-alias form defines the dspec.
define-dspec-alias is like
for dspecs, so it could be used to describe complicated conversions, as long as it can be done purely statically and totally in terms of existing dspecs. However, nothing more complicated than
has been found necessary.