The modularize-interfaces Reference Manual

This is the modularize-interfaces Reference Manual, version 0.9.3, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:05:56 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 modularize-interfaces

Programmatical interfaces extension for Modularize

Maintainer

Yukari Hafner <>

Author

Yukari Hafner <>

Home Page

https://Shinmera.github.io/modularize-interfaces/

Source Control

(GIT https://github.com/Shinmera/modularize-interfaces.git)

Bug Tracker

https://github.com/Shinmera/modularize-interfaces/issues

License

zlib

Version

0.9.3

Dependencies
  • modularize (system).
  • trivial-indent (system).
  • trivial-arguments (system).
  • lambda-fiddle (system).
Source

modularize-interfaces.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 modularize-interfaces/modularize-interfaces.asd

Source

modularize-interfaces.asd.

Parent Component

modularize-interfaces (system).

ASDF Systems

modularize-interfaces.


3.1.2 modularize-interfaces/package.lisp

Source

modularize-interfaces.asd.

Parent Component

modularize-interfaces (system).

Packages

modularize-interfaces.


3.1.3 modularize-interfaces/toolkit.lisp

Dependency

package.lisp (file).

Source

modularize-interfaces.asd.

Parent Component

modularize-interfaces (system).

Public Interface
Internals

3.1.4 modularize-interfaces/component.lisp

Dependency

toolkit.lisp (file).

Source

modularize-interfaces.asd.

Parent Component

modularize-interfaces (system).

Public Interface
Internals

3.1.5 modularize-interfaces/standard-components.lisp

Dependency

component.lisp (file).

Source

modularize-interfaces.asd.

Parent Component

modularize-interfaces (system).

Public Interface
Internals

3.1.6 modularize-interfaces/interface.lisp

Dependency

standard-components.lisp (file).

Source

modularize-interfaces.asd.

Parent Component

modularize-interfaces (system).

Public Interface
Internals

3.1.7 modularize-interfaces/module.lisp

Dependency

interface.lisp (file).

Source

modularize-interfaces.asd.

Parent Component

modularize-interfaces (system).

Public Interface

implements (function).


3.1.8 modularize-interfaces/indent.lisp

Dependency

module.lisp (file).

Source

modularize-interfaces.asd.

Parent Component

modularize-interfaces (system).


4 Packages

Packages are listed by definition order.


4.1 modularize-interfaces

Source

package.lisp.

Nicknames
  • org.shirakumo.radiance.lib.modularize.interfaces
  • interfaces
Use List
  • common-lisp.
  • lambda-fiddle.
  • modularize.
  • trivial-arguments.
  • trivial-indent.
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: defimpl (name &rest args)

Expands to I-DEFMACRO, I-DEFMETHOD or I-DEFUN depending on what kind of symbol it names.

Package

modularize-interfaces.

Source

standard-components.lisp.

Macro: define-component-expander (name (interface &rest arguments) &body body)

Defines a new component expander for interface definitions.

The NAME can be a list of names that will be aliased to the first one. All names will be turned into keywords to allow for differing naming schemes in the component definitions. INTERFACE should be a symbol to which the interface package is bound. ARGUMENTS is the lambda-list used to deconstruct the arguments of the component definition.

Package

modularize-interfaces.

Source

component.lisp.

Macro: define-component-tester (name (interface &rest arguments) &body body)

Defines a new testing method for a component type.

The structure of this macro is the same as for DEFINE-COMPONENT.

Package

modularize-interfaces.

Source

component.lisp.

Macro: define-interface (name &body components)

Defines a new interface.

This defines a new module with the given name and nicks, as well
as a fully qualified interface identifier which is the name prefixed by MODULARIZE.INT. . It then calls EXPAND-INTERFACE on the new module and finally expands the component definitions as per EXPAND-COMPONENTS.

Package

modularize-interfaces.

Source

interface.lisp.

Macro: define-interface-extension (name &body components)

Currently not implemented.

Package

modularize-interfaces.

Source

interface.lisp.

Macro: defmacro* (name args &body body)

Expands to a conditional macro definition that only happens if either *REDEFINE* is T or the macro has not yet been defined.

Package

modularize-interfaces.

Source

toolkit.lisp.

Macro: defmethod* (name &rest args)

Expands to a conditional method definition that only happens if either *REDEFINE* is T or the method has not yet been defined.

Package

modularize-interfaces.

Source

toolkit.lisp.

Macro: defun* (name args &body body)

Expands to a conditional function definition that only happens if either *REDEFINE* is T or the function has not yet been defined.

Package

modularize-interfaces.

Source

toolkit.lisp.

Macro: i-defmacro (name args &body body)

Expands to an interface macro definition.

Package

modularize-interfaces.

Source

standard-components.lisp.

Macro: i-defmethod (name &rest args)

Expands to an interface method definition.

Package

modularize-interfaces.

Source

standard-components.lisp.

Macro: i-defun (name args &body body)

Expands to an interface function definition.

Package

modularize-interfaces.

Source

standard-components.lisp.


5.1.2 Ordinary functions

Function: component-alias (alias)

Returns the actual component name the given alias points to or itself if it is not resolved..

Package

modularize-interfaces.

Source

component.lisp.

Function: (setf component-alias) (alias)

Sets a new alias for the given component-name.

Package

modularize-interfaces.

Source

component.lisp.

Function: generate-interface-stub (interface &optional package)

Generates a stub for the INTERFACE that you can use as an implementation starting point. Symbols are interned into PACKAGE where appropriate.

Package

modularize-interfaces.

Source

interface.lisp.

Function: implementation (interface)

Returns the currently active implementation of the interface.

Package

modularize-interfaces.

Source

interface.lisp.

Function: (setf implementation) (interface)

Attempts to set the implementation of an interface.
Interfaces can only be implemented by modules and if a different module already implements the interface a condition is signalled. The following restarts are available:
DELETE Deletes the old implementation through DELETE-MODULE. OVERRIDE Overrides the implementation and leaves the old module. ABORT Aborts the setting of the implementation completely.

If the implementation setting was successful, TEST-INTERFACE is called. If the implementation is set to NIL, RESET-INTERFACE is called.

Package

modularize-interfaces.

Source

interface.lisp.

Function: implements (module)

Returns a list of interfaces this module implements.

Package

modularize-interfaces.

Source

module.lisp.

Function: interface (object)

Returns the interface package module as identified by the object. See MODULE for more.

Package

modularize-interfaces.

Source

interface.lisp.

Function: interface-p (object)

Returns T if the passed object is or names an interface, otherwise NIL.

Package

modularize-interfaces.

Source

interface.lisp.

Function: print-interface-stub (interface &optional package)

Print the stub of GENERATE-INTERFACE-STUB in a way that is easily copy-pastable.

Package

modularize-interfaces.

Source

interface.lisp.

Function: reset-interface (interface)

Resets the interface by redefining it with stubs as per its component definitions.

Package

modularize-interfaces.

Source

interface.lisp.

Function: test-interface (interface)

Tests the interface for definition conformity. See TEST-COMPONENTS.

Package

modularize-interfaces.

Source

interface.lisp.


5.1.3 Generic functions

Generic Function: expand-component (type args &key interface &allow-other-keys)

Generic function used to expand components into their proper forms.

Package

modularize-interfaces.

Source

component.lisp.

Methods
Method: expand-component ((type1 (eql :variable)) args0 &key interface)
Source

standard-components.lisp.

Method: expand-component ((type1 (eql :method)) args0 &key interface)
Source

standard-components.lisp.

Method: expand-component ((type1 (eql :generic)) args0 &key interface)
Source

standard-components.lisp.

Method: expand-component ((type1 (eql :class)) args0 &key interface)
Source

standard-components.lisp.

Method: expand-component ((type1 (eql :condition)) args0 &key interface)
Source

standard-components.lisp.

Method: expand-component ((type1 (eql :macro)) args0 &key interface)
Source

standard-components.lisp.

Method: expand-component ((type1 (eql :function)) args0 &key interface)
Source

standard-components.lisp.

Method: expand-component ((type1 (eql :type)) args0 &key interface)
Source

standard-components.lisp.


5.1.4 Conditions

Condition: interface-already-implemented

Condition signalled if an interface is already implemented by a different module than was attempted to register as an implementation.

Package

modularize-interfaces.

Source

interface.lisp.

Direct superclasses

error.

Direct methods
Direct slots
Slot: %requested
Initform

(quote (error "interface required."))

Initargs

:interface

Readers

requested.

Writers

This slot is read-only.

Slot: %current
Initform

(quote (error "current required."))

Initargs

:current

Readers

current.

Writers

This slot is read-only.

Slot: %new
Initform

(quote (error "new required."))

Initargs

:new

Readers

new.

Writers

This slot is read-only.

Condition: interface-not-found

Condition signalled if an interface was requested but could not be found.

Package

modularize-interfaces.

Source

interface.lisp.

Direct superclasses

error.

Direct methods

requested.

Direct slots
Slot: %requested
Initform

(quote (error "requested required."))

Initargs

:requested

Readers

requested.

Writers

This slot is read-only.


5.2 Internals


5.2.1 Special variables

Special Variable: *component-alias*

Table of aliases for component names.

Package

modularize-interfaces.

Source

component.lisp.

Special Variable: *redefine*

Special variable that dictates whether already defined functions should be redefined by defun*, defmacro*, defmethod*.

Package

modularize-interfaces.

Source

toolkit.lisp.


5.2.2 Macros

Macro: expand-components (interface &body component-defs)

Expands the component definitions for the INTERFACE to their proper forms.

Package

modularize-interfaces.

Source

component.lisp.

Macro: expand-interface (interface)

Expands the given interface into its basic form.

Package

modularize-interfaces.

Source

interface.lisp.

Macro: with-muffled-warnings (&body body)

Calls the body with redefinition warnings muffled.

Currently only implemented on: SBCL

Package

modularize-interfaces.

Source

toolkit.lisp.


5.2.3 Ordinary functions

Function: check-function-name (name)
Package

modularize-interfaces.

Source

standard-components.lisp.

Function: emit-class-def (macro name super slots options)
Package

modularize-interfaces.

Source

standard-components.lisp.

Function: function-lambda-matches (function lambda-list)

Returns T if the function matches the lambda-list in arguments.
As a secondary value it returns a reason as to why it may have failed the test.

Package

modularize-interfaces.

Source

toolkit.lisp.

Function: intern-function-name (package name)

Interns the function name into the package. This has special handling for (SETF NAME).

Package

modularize-interfaces.

Source

toolkit.lisp.

Function: make-keyword (name)

Returns the matching keyword for the NAME.

Package

modularize-interfaces.

Source

toolkit.lisp.

Function: test-components (interface component-defs)

Tests the interface against the component-definitions to see if it matches. That is to say, the passed component-defs tell what the interface should look like and this function will test if the defined components match this definition
to a certain extent.

How well and thorough the tests are depends on the component itself and its test function. Certain components may even not provide any tests at all.

Package

modularize-interfaces.

Source

component.lisp.


5.2.4 Generic functions

Generic Reader: component (condition)
Generic Writer: (setf component) (condition)
Package

modularize-interfaces.

Methods
Reader Method: component ((condition component-test-failed))
Writer Method: (setf component) ((condition component-test-failed))
Source

component.lisp.

Target Slot

%component.

Generic Reader: current (condition)
Package

modularize-interfaces.

Methods
Reader Method: current ((condition interface-already-implemented))
Source

interface.lisp.

Target Slot

%current.

Generic Reader: new (condition)
Package

modularize-interfaces.

Methods
Reader Method: new ((condition interface-already-implemented))
Source

interface.lisp.

Target Slot

%new.

Generic Reader: requested (condition)
Generic Writer: (setf requested) (condition)
Package

modularize-interfaces.

Methods
Reader Method: requested ((condition component-test-failed))
Writer Method: (setf requested) ((condition component-test-failed))
Source

component.lisp.

Target Slot

%requested.

Reader Method: requested ((condition interface-already-implemented))
Source

interface.lisp.

Target Slot

%requested.

Reader Method: requested ((condition interface-not-found))
Source

interface.lisp.

Target Slot

%requested.

Generic Reader: result (condition)
Generic Writer: (setf result) (condition)
Package

modularize-interfaces.

Methods
Reader Method: result ((condition component-test-failed))
Writer Method: (setf result) ((condition component-test-failed))
Source

component.lisp.

Target Slot

%result.

Generic Function: test-component (type args &key interface &allow-other-keys)

Tests a component type for validity.

Package

modularize-interfaces.

Source

component.lisp.

Methods
Method: test-component ((type1 (eql :macro)) args0 &key interface)
Source

standard-components.lisp.

Method: test-component ((type1 (eql :function)) args0 &key interface)
Source

standard-components.lisp.

Method: test-component (type args &key interface)

5.2.5 Conditions

Condition: component-test-failed

Condition signalled when the test of an interface component failed for some reason.

Package

modularize-interfaces.

Source

component.lisp.

Direct superclasses

warning.

Direct methods
Direct slots
Slot: %requested
Initform

(quote (error "interface required."))

Initargs

:interface

Readers

requested.

Writers

(setf requested).

Slot: %component
Initform

(quote (error "component required."))

Initargs

:component

Readers

component.

Writers

(setf component).

Slot: %result
Initform

(quote nil)

Initargs

:result

Readers

result.

Writers

(setf result).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
C   D   E   F   G   I   M   N   P   R   T   W  
Index Entry  Section

(
(setf component): Private generic functions
(setf component): Private generic functions
(setf component-alias): Public ordinary functions
(setf implementation): Public ordinary functions
(setf requested): Private generic functions
(setf requested): Private generic functions
(setf result): Private generic functions
(setf result): Private generic functions

C
check-function-name: Private ordinary functions
component: Private generic functions
component: Private generic functions
component-alias: Public ordinary functions
current: Private generic functions
current: Private generic functions

D
defimpl: Public macros
define-component-expander: Public macros
define-component-tester: Public macros
define-interface: Public macros
define-interface-extension: Public macros
defmacro*: Public macros
defmethod*: Public macros
defun*: Public macros

E
emit-class-def: Private ordinary functions
expand-component: Public generic functions
expand-component: Public generic functions
expand-component: Public generic functions
expand-component: Public generic functions
expand-component: Public generic functions
expand-component: Public generic functions
expand-component: Public generic functions
expand-component: Public generic functions
expand-component: Public generic functions
expand-components: Private macros
expand-interface: Private macros

F
Function, (setf component-alias): Public ordinary functions
Function, (setf implementation): Public ordinary functions
Function, check-function-name: Private ordinary functions
Function, component-alias: Public ordinary functions
Function, emit-class-def: Private ordinary functions
Function, function-lambda-matches: Private ordinary functions
Function, generate-interface-stub: Public ordinary functions
Function, implementation: Public ordinary functions
Function, implements: Public ordinary functions
Function, interface: Public ordinary functions
Function, interface-p: Public ordinary functions
Function, intern-function-name: Private ordinary functions
Function, make-keyword: Private ordinary functions
Function, print-interface-stub: Public ordinary functions
Function, reset-interface: Public ordinary functions
Function, test-components: Private ordinary functions
Function, test-interface: Public ordinary functions
function-lambda-matches: Private ordinary functions

G
generate-interface-stub: Public ordinary functions
Generic Function, (setf component): Private generic functions
Generic Function, (setf requested): Private generic functions
Generic Function, (setf result): Private generic functions
Generic Function, component: Private generic functions
Generic Function, current: Private generic functions
Generic Function, expand-component: Public generic functions
Generic Function, new: Private generic functions
Generic Function, requested: Private generic functions
Generic Function, result: Private generic functions
Generic Function, test-component: Private generic functions

I
i-defmacro: Public macros
i-defmethod: Public macros
i-defun: Public macros
implementation: Public ordinary functions
implements: Public ordinary functions
interface: Public ordinary functions
interface-p: Public ordinary functions
intern-function-name: Private ordinary functions

M
Macro, defimpl: Public macros
Macro, define-component-expander: Public macros
Macro, define-component-tester: Public macros
Macro, define-interface: Public macros
Macro, define-interface-extension: Public macros
Macro, defmacro*: Public macros
Macro, defmethod*: Public macros
Macro, defun*: Public macros
Macro, expand-components: Private macros
Macro, expand-interface: Private macros
Macro, i-defmacro: Public macros
Macro, i-defmethod: Public macros
Macro, i-defun: Public macros
Macro, with-muffled-warnings: Private macros
make-keyword: Private ordinary functions
Method, (setf component): Private generic functions
Method, (setf requested): Private generic functions
Method, (setf result): Private generic functions
Method, component: Private generic functions
Method, current: Private generic functions
Method, expand-component: Public generic functions
Method, expand-component: Public generic functions
Method, expand-component: Public generic functions
Method, expand-component: Public generic functions
Method, expand-component: Public generic functions
Method, expand-component: Public generic functions
Method, expand-component: Public generic functions
Method, expand-component: Public generic functions
Method, new: Private generic functions
Method, requested: Private generic functions
Method, requested: Private generic functions
Method, requested: Private generic functions
Method, result: Private generic functions
Method, test-component: Private generic functions
Method, test-component: Private generic functions
Method, test-component: Private generic functions

N
new: Private generic functions
new: Private generic functions

P
print-interface-stub: Public ordinary functions

R
requested: Private generic functions
requested: Private generic functions
requested: Private generic functions
requested: Private generic functions
reset-interface: Public ordinary functions
result: Private generic functions
result: Private generic functions

T
test-component: Private generic functions
test-component: Private generic functions
test-component: Private generic functions
test-component: Private generic functions
test-components: Private ordinary functions
test-interface: Public ordinary functions

W
with-muffled-warnings: Private macros


A.4 Data types

Jump to:   C   F   I   M   P   S   T  
Index Entry  Section

C
component-test-failed: Private conditions
component.lisp: The modularize-interfaces/component․lisp file
Condition, component-test-failed: Private conditions
Condition, interface-already-implemented: Public conditions
Condition, interface-not-found: Public conditions

F
File, component.lisp: The modularize-interfaces/component․lisp file
File, indent.lisp: The modularize-interfaces/indent․lisp file
File, interface.lisp: The modularize-interfaces/interface․lisp file
File, modularize-interfaces.asd: The modularize-interfaces/modularize-interfaces․asd file
File, module.lisp: The modularize-interfaces/module․lisp file
File, package.lisp: The modularize-interfaces/package․lisp file
File, standard-components.lisp: The modularize-interfaces/standard-components․lisp file
File, toolkit.lisp: The modularize-interfaces/toolkit․lisp file

I
indent.lisp: The modularize-interfaces/indent․lisp file
interface-already-implemented: Public conditions
interface-not-found: Public conditions
interface.lisp: The modularize-interfaces/interface․lisp file

M
modularize-interfaces: The modularize-interfaces system
modularize-interfaces: The modularize-interfaces package
modularize-interfaces.asd: The modularize-interfaces/modularize-interfaces․asd file
module.lisp: The modularize-interfaces/module․lisp file

P
Package, modularize-interfaces: The modularize-interfaces package
package.lisp: The modularize-interfaces/package․lisp file

S
standard-components.lisp: The modularize-interfaces/standard-components․lisp file
System, modularize-interfaces: The modularize-interfaces system

T
toolkit.lisp: The modularize-interfaces/toolkit․lisp file