The method-combination-utilities Reference Manual

This is the method-combination-utilities Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:02:38 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 method-combination-utilities

Various method combinations and utilities to make it easy to create new method combinations.

Author

Greg Pfeil <>

License

MIT

Long Description

See README.md

Dependency

closer-mop (system).

Source

method-combination-utilities.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 method-combination-utilities/method-combination-utilities.asd

Source

method-combination-utilities.asd.

Parent Component

method-combination-utilities (system).

ASDF Systems

method-combination-utilities.

Packages

method-combination-utilities.system.


3.1.3 method-combination-utilities/definition-helpers.lisp

Dependency

package.lisp (file).

Source

method-combination-utilities.asd.

Parent Component

method-combination-utilities (system).

Public Interface

3.1.4 method-combination-utilities/method-combinations.lisp

Dependency

package.lisp (file).

Source

method-combination-utilities.asd.

Parent Component

method-combination-utilities (system).

Public Interface

3.1.5 method-combination-utilities/method-combination-expand.lisp

Dependency

package.lisp (file).

Source

method-combination-utilities.asd.

Parent Component

method-combination-utilities (system).

Public Interface

method-combination-expand (macro).

Internals

4 Packages

Packages are listed by definition order.


4.1 method-combination-utilities.system

Source

method-combination-utilities.asd.

Use List
  • asdf/interface.
  • common-lisp.

4.2 method-combination-utilities

Source

package.lisp.

Use List
  • closer-common-lisp.
  • closer-mop.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Macros

Macro: method-combination-expand (form)

Given a function call form, this returns the method-combination form that would be generated in the process of satisfying that call. This is only expected to work for functions whose method-combination was created using the long form of DEFINE-METHOD-COMBINATION.

Package

method-combination-utilities.

Source

method-combination-expand.lisp.


5.1.2 Ordinary functions

Function: call-methods (methods)

It’s rare to see a method combination that doesn’t define this method, so might as well pull it into this utilities package. CALL-METHODS returns a list of CALL-METHOD forms; one for each method in METHODS

Package

method-combination-utilities.

Source

definition-helpers.lisp.

Function: combine-standard-methods (primary-methods &optional around-methods before-methods after-methods)

It is fairly common practice to take the STANDARD method combination and wrap it with additional qualified methods. This encapsulates the standard behavior as much as possible to make wrapping simpler. Each argument should be a list of methods to be handled the way the corresponding methods are in the STANDARD method combination. It assumes all the lists are ordered properly already. See the LAX method combination in this package for an example.

Package

method-combination-utilities.

Source

definition-helpers.lisp.

Function: wrap-primary-form (primary-form &optional around-methods before-methods after-methods)

This is similar to COMBINE-STANDARD-METHODS, but it takes an already- generated primary form rather than a list of primary methods. This is because it is fairly common for a method combination to deal with primary methods in some specialized way, then combine them with normal :AROUND/:BEFORE/:AFTER methods. See the BASIC and APPEND/NCONC combinations in this package for examples.

Package

method-combination-utilities.

Source

definition-helpers.lisp.


5.1.3 Method combinations

Method Combination: append/nconc (&optional order)

This is an improvement on the built-in APPEND method combination, which uses the short form of DEFINE-METHOD-COMBINATION. This allows either ‘NCONC‘ or ‘APPEND‘ to be used as a qualifier depending on whether or not the method returns a list where the last cons can be modified. If all but the last primary methods specify ‘NCONC‘, then ‘NCONC‘ will be used, otherwise, ‘APPEND‘.

Package

method-combination-utilities.

Source

method-combinations.lisp.

Method Combination: basic (operator &optional identity-with-one-argument-p order)

This combination removes the need for the built-in combinations (other than STANDARD) and the short form of DEFINE-METHOD-COMBINATION.

Differences from old built-in usage:
* specify as ’(basic progn t :most-specific-last) instead of
’(progn :most-specific-last)
* can specify an arbitrary operator without having to first DEFINE-METHOD-COMBINATION
* IDENTITY-WITH-ONE-ARGUMENT[-P] is now specified at usage rather than definition
* :BEFORE and :AFTER methods are allowed.

Package

method-combination-utilities.

Source

method-combinations.lisp.

Method Combination: lax ()

This combination allows (and ignores) additional method qualifiers after any of the ‘STANDARD‘ qualifiers. It is useful if you are handling your qualifiers in a custom method class.

Package

method-combination-utilities.

Source

method-combinations.lisp.

Method Combination: primary ()

This simple method combination requires that no methods have any qualifiers. Methods are treated exactly like primary methods in the STANDARD method combination.

Package

method-combination-utilities.

Source

method-combinations.lisp.


5.2 Internals


5.2.1 Ordinary functions

Function: method-combination-expander-function (method-combination)
Package

method-combination-utilities.

Source

method-combination-expand.lisp.

Function: method-combination-expansion-form (expander gf mc methods)
Package

method-combination-utilities.

Source

method-combination-expand.lisp.


Appendix A Indexes


A.1 Concepts


A.3 Variables


A.4 Data types

Jump to:   D   F   M   P   S  
Index Entry  Section

D
definition-helpers.lisp: The method-combination-utilities/definition-helpers․lisp file

F
File, definition-helpers.lisp: The method-combination-utilities/definition-helpers․lisp file
File, method-combination-expand.lisp: The method-combination-utilities/method-combination-expand․lisp file
File, method-combination-utilities.asd: The method-combination-utilities/method-combination-utilities․asd file
File, method-combinations.lisp: The method-combination-utilities/method-combinations․lisp file
File, package.lisp: The method-combination-utilities/package․lisp file

M
method-combination-expand.lisp: The method-combination-utilities/method-combination-expand․lisp file
method-combination-utilities: The method-combination-utilities system
method-combination-utilities: The method-combination-utilities package
method-combination-utilities.asd: The method-combination-utilities/method-combination-utilities․asd file
method-combination-utilities.system: The method-combination-utilities․system package
method-combinations.lisp: The method-combination-utilities/method-combinations․lisp file

P
Package, method-combination-utilities: The method-combination-utilities package
Package, method-combination-utilities.system: The method-combination-utilities․system package
package.lisp: The method-combination-utilities/package․lisp file

S
System, method-combination-utilities: The method-combination-utilities system