For some purposes, most usefully trace and defadvice, LispWorks allows dspecs that do not name a global definition, but a local function. These are of the form:
(subfunction sub-name parent-dspec)
where parent-dspec is another dspec (possibly a subfunction dspec itself). For flet and labels, it is also possible to use the form:
(flet sub-name parent-dspec) | |
An alias for |
or:
(labels sub-name parent-dspec) | |
An alias for |
sub-name is the name of the subfunction inside the parent, which by default is determined as follows:
(flet function-name)
or (labels function-name)
, where function-name is the function name in the flet or labels definition.
You can override the default name by using the LispWorks-specific hcl:lambda-name
declaration (see declare). Note that you should use the form:
(declare (lambda-name (subfunction sub-name))
to get a name that is useful for debugging. If you do not use subfunction
, then the debugger cannot find the source for function.
Notes:
(top-level-form (location tlf))
location is an atomic location (not containing :inside
, see 7.7.1 Locations) and tlf identifies the top-level form within that location. These are used as parent dspecs in subfunction dspecs and :inside
locations. These dspecs can be canonicalized and prettified, and can be returned as dspecs from the location finders.
LispWorks® User Guide and Reference Manual - 01 Dec 2021 19:30:19