The org.tfeb.conduit-packages Reference Manual

This is the org.tfeb.conduit-packages Reference Manual, version 5.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 17:47:47 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 org.tfeb.conduit-packages

Conduit packages

Author

Tim Bradshaw

Home Page

https://github.com/tfeb/conduit-packages

License

MIT

Version

5.0.0

Source

org.tfeb.conduit-packages.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 org.tfeb.conduit-packages/org.tfeb.conduit-packages.asd

Source

org.tfeb.conduit-packages.asd.

Parent Component

org.tfeb.conduit-packages (system).

ASDF Systems

org.tfeb.conduit-packages.


3.1.3 org.tfeb.conduit-packages/impl.lisp

Dependency

pkg.lisp (file).

Source

org.tfeb.conduit-packages.asd.

Parent Component

org.tfeb.conduit-packages (system).

Public Interface
Internals

3.1.4 org.tfeb.conduit-packages/cometh.lisp

Dependency

impl.lisp (file).

Source

org.tfeb.conduit-packages.asd.

Parent Component

org.tfeb.conduit-packages (system).

Packages

4 Packages

Packages are listed by definition order.


4.1 org.tfeb.conduit-packages

Source

pkg.lisp.

Use List

common-lisp.

Public Interface
Internals

4.2 org.tfeb.cl/conduits

Source

cometh.lisp.

Nickname

org.tfeb.clc

Used By List

org.tfeb.cl-user/conduits.


4.3 org.tfeb.cl-user/conduits

Source

cometh.lisp.

Nickname

org.tfeb.clc-user

Use List

org.tfeb.cl/conduits.


5 Definitions

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


5.1 Public Interface


5.1.1 Special variables

Special Variable: *define-package-mechanisms*

A list of mechanism names for conduit packages’ DEFINE-PACKAGE

For each of these mechanism names, EQL methods must be defined on INITIAL-DEFINE-PACKAGE-STATE, PROCESS-DEFINE-PACKAGE-CLAUSE and COMPUTE-DEFINE-PACKAGE-FORMS, which see.

You can (and should) add and remove your own entries to this variable, but don’t muck around with other people’s.

Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Special Variable: *extended-cl-define-package-clause-keys*

A list of DEFPACKAGE clause keywords which should be treated as part of CL

Clauses with these keywords will be handled by the CL clause handler

Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Special Variable: *underlying-package-implementations*

An alist which maps from names which conduits provides new implementations for and their underlying implementation function names. You can use this if you want to layer conduits on top of some other system which already is providing its own versions of these names. By default the underlying names are just the standard CL functions.

The keys of this alist are keywords, corresponding to the name in the CL package, to avoid any package confusion.

Package

org.tfeb.conduit-packages.

Source

impl.lisp.


5.1.2 Macros

Macro: define-conduit-package (name &body clauses)

Version of DEFINE-PACKAGE which adds a (:use)

This also checks for explicit (:use x) clauses and signals appropriate restartable errors.

See DEFINE-PACKAGE

Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Macro: define-package (name &body clauses)

Extensible variant of DEFPACKAGE

This macro is like CL:DEFPACKAGE, and supports the standard
CL clauses, some optional common extended clauses (see *EXTENDED-CL-DEFINE-PACKAGE-CLAUSE-KEYS*, as well as conduit packages and package cloning. See *DEFINE-PACKAGE-MECHANISMS* and the the documentation of conduit packages for the extension mechanism for this macro.

Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Macro: defpackage (name &body clauses)

DEFPACKAGE for conduit packages

This version of DEFPACKAGE is like CL’s DEFPACKAGE, but can define a
‘conduit package’: that you can use as a conduit to extend existing
packages. This works by importing symbols from the existing packages
and then reexporting them. The syntax is as DEFPACKAGE, with the
addition of three new clauses:
(:EXTENDS package) takes package and reexports all its symbols; (:EXTENDS/INCLUDING package . syms/names) reexports only syms/names; (:EXTENDS/EXCLUDING package . syms/names) reexports all *but* syms/names. When defining a conduit package you almost certainly will want to say (:USE) to prevent the CL package being used.

This version of DEFPACKAGE also support ‘cloning’ packages: making another package which is ‘just like’ an existing package. This means that all the internal, exported and shadowing symbols in the clone will be the same as those in the cloned package, but any additional things defined by DEFPACKAGE will also take effect. This allows you to essentially make a copy of
a package which you can then use to define new functionality without interning a lot of things in the original package. Cloning is a static operation - packages do not know who their clones are, and no attempt is made to keep clones up to date. Cloning is done by the clause
(:CLONES package)
Cloning is not compatible with extending (this is checked).
As with extending you probably want to specify (:USE) when cloning.

This version of DEFPACKAGE is simply a shim around DEFINE-PACKAGE, which see

Package

org.tfeb.conduit-packages.

Source

impl.lisp.


5.1.3 Ordinary functions

Function: delete-package (pack/name)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: export (symbol/s &optional package)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: recompute-conduits ()

Clean up the lists of conduits, and recompute all conduit packages to make them consistent

Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: rename-package (pack/name new-name &optional nicknames)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: unexport (symbol/s &optional package)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.


5.1.4 Generic functions

Generic Function: compute-define-package-forms (mechanism state name clauses)

Compute forms for the expansion of DEFINE-PACKAGE for a mechanism

This is called for each mechanism in *DEFINE-PACKAGE-MECHANISMS* and each clause in the DEFINE-PACKAGE form. Generally you should define EQL methods on this generic function for any mechanism you want to add.

Arguments are:
- the mechanism name, a symbol;
- the final state for this mechanism;
- the name of the package being defined;
- all the DEFINE-PACKAGE clauses.

This must return three values:
- a list of forms which will be evaluated before the final DEFPACKAGE form; - a list of clauses to add to the DEFPACKAGE form;
- a list of forms which will be evaluated after the DEFPACKAGE form.

Both the before forms and after forms will be evaluated within an ‘(eval-when (:compile-toplevel :load-toplevel :execute) ...) form.

Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Methods
Method: compute-define-package-forms ((mechanism (eql org.tfeb.conduit-packages::conduit-packages)) state name clauses)
Method: compute-define-package-forms ((mechanism (eql org.tfeb.conduit-packages::common-lisp)) state name clauses)
Generic Function: initial-define-package-state (mechanism name clauses)

Return the initial state for a DEFINE-PACKAGE mechanism

This is called for each mechanism in *define-package-mechanisms*. Generally you should define EQL methods on this generic function for
any mechanism name you want to add.

Arguments are the mechanism name, the name of the package being
defined and all the clauses for the DEFINE-PACKAGE form.

The state this returns can be any object at all, and is handed to both calls to PROCESS-DEFINE-PACKAGE-CLAUSE and COMPUTE-DEFINE-PACKAGE-FORMS. It may be mutated freely by the appropriate methods for these generic functions.

Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Methods
Method: initial-define-package-state ((mechanism (eql org.tfeb.conduit-packages::conduit-packages)) name clauses)
Method: initial-define-package-state ((mechanism (eql org.tfeb.conduit-packages::common-lisp)) name clauses)
Generic Function: process-define-package-clause (mechanism key clause state name clauses)

Process a define-package clause for a mechanism

This is called for each mechanism in *DEFINE-PACKAGE-MECHANISMS* and each clause in the DEFINE-PACKAGE form. Generally you should define EQL methods on this generic function for any mechanism you want to add.

Arguments are
- the mechanism, a symbol;
- the keyword of the DEFINE-PACKAGE clause, a keyword;
- the whole DEFINE-PACKAGE clause being processed, a list;
- the current state for the mechanism;
- the name of the package being defined;
- all the DEFINE-PACKAGE clauses.

This should return two values:
- an updated state for this mechanism;
- a boolean indicating whether it handled the key

Note that each mechanism gets given each clause, so more than one mechanism can handle a clause. But unless at least one mechanism does an error will be signalled.

Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Methods
Method: process-define-package-clause ((mechanism (eql org.tfeb.conduit-packages::conduit-packages)) key clause state name clauses)
Method: process-define-package-clause ((mechanism (eql org.tfeb.conduit-packages::common-lisp)) key clause state name clauses)

5.2 Internals


5.2.1 Special variables

Special Variable: *conduit-package-descriptions*
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Special Variable: *conduit-packages*
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Special Variable: *package-conduits*
Package

org.tfeb.conduit-packages.

Source

impl.lisp.


5.2.2 Ordinary functions

Function: canonicalise-package-name (package/name)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: clean-package-alist (pa)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: compute-clone-clauses (froms)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: compute-conduit-clauses (&key extends extends/including extends/excluding)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: conduit-error (package format &rest format-arguments)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: ensure-external-symbol (d p)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: ensure-package (p)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: funcall/ul (fname &rest args)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: make-package-conduit-package (package/name &key extends extends/including extends/excluding)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: note-conduit (pack conduit)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: note-conduits (package-name &key extends extends/including extends/excluding)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: recompute-conduits-for (pack &optional chain)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: underlying (name)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Function: validate-conduits (&key extends extends/including extends/excluding)
Package

org.tfeb.conduit-packages.

Source

impl.lisp.


5.2.3 Conditions

Condition: conduit-error
Package

org.tfeb.conduit-packages.

Source

impl.lisp.

Direct superclasses
  • package-error.
  • simple-error.

Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   C   D   E   F   G   I   M   N   P   R   U   V  
Index Entry  Section

C
canonicalise-package-name: Private ordinary functions
clean-package-alist: Private ordinary functions
compute-clone-clauses: Private ordinary functions
compute-conduit-clauses: Private ordinary functions
compute-define-package-forms: Public generic functions
compute-define-package-forms: Public generic functions
compute-define-package-forms: Public generic functions
conduit-error: Private ordinary functions

D
define-conduit-package: Public macros
define-package: Public macros
defpackage: Public macros
delete-package: Public ordinary functions

E
ensure-external-symbol: Private ordinary functions
ensure-package: Private ordinary functions
export: Public ordinary functions

F
funcall/ul: Private ordinary functions
Function, canonicalise-package-name: Private ordinary functions
Function, clean-package-alist: Private ordinary functions
Function, compute-clone-clauses: Private ordinary functions
Function, compute-conduit-clauses: Private ordinary functions
Function, conduit-error: Private ordinary functions
Function, delete-package: Public ordinary functions
Function, ensure-external-symbol: Private ordinary functions
Function, ensure-package: Private ordinary functions
Function, export: Public ordinary functions
Function, funcall/ul: Private ordinary functions
Function, make-package-conduit-package: Private ordinary functions
Function, note-conduit: Private ordinary functions
Function, note-conduits: Private ordinary functions
Function, recompute-conduits: Public ordinary functions
Function, recompute-conduits-for: Private ordinary functions
Function, rename-package: Public ordinary functions
Function, underlying: Private ordinary functions
Function, unexport: Public ordinary functions
Function, validate-conduits: Private ordinary functions

G
Generic Function, compute-define-package-forms: Public generic functions
Generic Function, initial-define-package-state: Public generic functions
Generic Function, process-define-package-clause: Public generic functions

I
initial-define-package-state: Public generic functions
initial-define-package-state: Public generic functions
initial-define-package-state: Public generic functions

M
Macro, define-conduit-package: Public macros
Macro, define-package: Public macros
Macro, defpackage: Public macros
make-package-conduit-package: Private ordinary functions
Method, compute-define-package-forms: Public generic functions
Method, compute-define-package-forms: Public generic functions
Method, initial-define-package-state: Public generic functions
Method, initial-define-package-state: Public generic functions
Method, process-define-package-clause: Public generic functions
Method, process-define-package-clause: Public generic functions

N
note-conduit: Private ordinary functions
note-conduits: Private ordinary functions

P
process-define-package-clause: Public generic functions
process-define-package-clause: Public generic functions
process-define-package-clause: Public generic functions

R
recompute-conduits: Public ordinary functions
recompute-conduits-for: Private ordinary functions
rename-package: Public ordinary functions

U
underlying: Private ordinary functions
unexport: Public ordinary functions

V
validate-conduits: Private ordinary functions