A symbol naming the dspec class
A symbol naming the superspace
A string describing the dspec class
A function that generates the undefining form for the class
A function to canonicalize a dspec if it belongs to the class
A function to return a prettier form of a dspec of the class
A function to decide if a dspec of the class currently has a definition
A function to return the dspec from an object if it was defined by the class
A function to return all the currently defined parts in the class for a given a primary-name
The aggregate dspec class for a part dspec
After evaluating a
can be used by defining forms to record locations of definitions of that dspec class name by calling record-definition.
is given, its value must be a function of one argument. When LispWorks wants to remove a definition, it will call the function with a canonical dspec of class
. The function should returns a form that removes the current definition of that dspec. For example, the undefining form for package dspecs might be
is omitted, then definitions of this class cannot be undefined.
is given, its value must be a function of one argument. The function will be called by canonicalize-dspec for a dspec of the given class. The value returned by the canonicalize function must be a fully canonical dspec of the given class. A typical use for the canonicalize function would be to remove extra options from the dspec which are not required to make the dspec unique. The canonicalize function should return
for malformed dspecs and should take care not to signal an error. The default canonicalize function returns the dspec if it matches the form
(dspec-class symbol )
If prettify is given, its value must be a function of one argument. When LispWorks wants to print a dspec, for example in an error message, it will call the prettify function for the class of the dspec. The argument will be the canonical dspec and the function should return a dspec which is considered "prettier" for a user to see. The default prettify function returns the dspec unchanged.
is given, its value must be function of one argument. When LispWorks wants to discover if a given dspec is defined, it calls the function with the dspec-primary-name of the dspec. The
function should return true if the primary name is defined in this dspec class and
otherwise. The default
function always returns
is given, its value must be a function of one argument. When LispWorks wants to find the dspec that created a given object (for example a package object created by a
form), it calls the
functions in all dspec classes. The function should return a dspec for the object if that object was defined by the dspec class or
otherwise. For example, the
function for package dspecs might be:
If defined-parts is given, its value must be a function of one argument. When LispWorks wants to find all the definitions that are parts of a given aggregate dspec class, it calls the defined-parts functions with the dspec-primary-name of the dspec in each class that aggregates with it. The function should return a list of dspecs which are defined parts of the primary name in the class name . If this keyword is given, aggregate-class must also be given.
is given, its value must be a symbol naming a dspec class that is the aggregate class of the parts defined by
dspecs. For example, the aggregate class of
because methods are the defined parts of a particular generic function. If this keyword is given, the
must also be given.
work for your dspec class, add a suitable method as described for documentation.