The extensible-optimizing-coerce Reference Manual

This is the extensible-optimizing-coerce Reference Manual, version 0.1.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Fri Sep 15 05:01:07 2023 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 extensible-optimizing-coerce

‘extensible-optimizing-coerce‘ primarily provides a ‘extensible-optimizing-coerce:coerce‘ function intended as an extensible alternative to ‘cl:coerce‘.

Author

<>

License

MIT

Version

0.1.0

Dependencies
  • trivial-types (system).
  • closer-mop (system).
  • optima (system).
  • extensible-compound-types (system).
  • extensible-compound-types-interfaces (system).
Source

extensible-optimizing-coerce.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 extensible-optimizing-coerce/extensible-optimizing-coerce.asd

Source

extensible-optimizing-coerce.asd.

Parent Component

extensible-optimizing-coerce (system).

ASDF Systems

extensible-optimizing-coerce.


3.1.3 extensible-optimizing-coerce/tables.lisp

Dependency

package.lisp (file).

Source

extensible-optimizing-coerce.asd.

Parent Component

extensible-optimizing-coerce (system).

Internals

3.1.4 extensible-optimizing-coerce/coerce.lisp

Dependency

tables.lisp (file).

Source

extensible-optimizing-coerce.asd.

Parent Component

extensible-optimizing-coerce (system).

Public Interface
Internals

3.1.5 extensible-optimizing-coerce/coercions.lisp

Dependency

coerce.lisp (file).

Source

extensible-optimizing-coerce.asd.

Parent Component

extensible-optimizing-coerce (system).


4 Packages

Packages are listed by definition order.


4.1 extensible-optimizing-coerce

Source

package.lisp.

Use List

common-lisp.

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: define-coercion ((var &key to from) lambda-list &body body)

Defines a coercion for VAR of class FROM to class TO.
Assumes the coercion to be valid in null lexical environment.

LAMBDA-LIST can be used to specify the additional arguments in cases where the class name has a LIST form of the type specifier.

Package

extensible-optimizing-coerce.

Source

coerce.lisp.


5.1.2 Compiler macros

Compiler Macro: coerce (object output-type-spec)
Package

extensible-optimizing-coerce.

Source

coerce.lisp.


5.1.3 Ordinary functions

Function: coerce (object output-type-spec)

Converts OBJECT to type specified by OUTPUT-TYPE-SPEC. To do so, the system internally makes use of coercions (lambda functions) defined using DEFINE-COERCION.

The applicable coercion is guaranteed to take an object of (super)type of OBJECT and return an object of (sub)type specified by OUTPUT-TYPE-SPEC. It is guaranteed that only a single (predefined) coercion is applicable for a given OUTPUT-TYPE-SPEC.

Package

extensible-optimizing-coerce.

Source

coerce.lisp.

Function: list-all-coercions (&optional to)
Package

extensible-optimizing-coerce.

Source

coerce.lisp.

Function: undefine-coercion (from to)

Removes a coercion TYPE= to FROM and TO.

Package

extensible-optimizing-coerce.

Source

coerce.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *coercion-expression-table*
Package

extensible-optimizing-coerce.

Source

tables.lisp.

Special Variable: *coercion-table*
Package

extensible-optimizing-coerce.

Source

tables.lisp.


5.2.2 Macros

Macro: named-lambda (name lambda-list &body body)
Package

extensible-optimizing-coerce.

Source

coerce.lisp.


5.2.3 Ordinary functions

Function: class-name-from-object (object)
Package

extensible-optimizing-coerce.

Source

coerce.lisp.

Function: class-name-from-type-spec (type-spec)
Package

extensible-optimizing-coerce.

Source

coerce.lisp.

Function: coercion (from-class to-class)
Package

extensible-optimizing-coerce.

Source

tables.lisp.

Function: (setf coercion) (from-class to-class)
Package

extensible-optimizing-coerce.

Source

tables.lisp.

Function: coercion-expression (from-class to-class)
Package

extensible-optimizing-coerce.

Source

tables.lisp.

Function: (setf coercion-expression) (from-class to-class)
Package

extensible-optimizing-coerce.

Source

tables.lisp.

Reader: coercion-table-all (instance)
Writer: (setf coercion-table-all) (instance)
Package

extensible-optimizing-coerce.

Source

tables.lisp.

Target Slot

all.

Reader: coercion-table-cache (instance)
Writer: (setf coercion-table-cache) (instance)
Package

extensible-optimizing-coerce.

Source

tables.lisp.

Target Slot

cache.

Function: coercion-table-p (object)
Package

extensible-optimizing-coerce.

Source

tables.lisp.

Function: copy-coercion-table (instance)
Package

extensible-optimizing-coerce.

Source

tables.lisp.

Function: make-coercion-table (&key cache all)
Package

extensible-optimizing-coerce.

Source

tables.lisp.

Function: speed-more-than-debug-p (&optional env)
Package

extensible-optimizing-coerce.

Source

coerce.lisp.

Function: speed-more-than-safety-p (&optional env)
Package

extensible-optimizing-coerce.

Source

coerce.lisp.


5.2.4 Structures

Structure: coercion-table
Package

extensible-optimizing-coerce.

Source

tables.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: cache
Type

hash-table

Initform

(make-hash-table :test (function equal))

Readers

coercion-table-cache.

Writers

(setf coercion-table-cache).

Slot: all
Type

list

Readers

coercion-table-all.

Writers

(setf coercion-table-all).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (  
C   D   F   L   M   N   S   U  
Index Entry  Section

(
(setf coercion): Private ordinary functions
(setf coercion-expression): Private ordinary functions
(setf coercion-table-all): Private ordinary functions
(setf coercion-table-cache): Private ordinary functions

C
class-name-from-object: Private ordinary functions
class-name-from-type-spec: Private ordinary functions
coerce: Public compiler macros
coerce: Public ordinary functions
coercion: Private ordinary functions
coercion-expression: Private ordinary functions
coercion-table-all: Private ordinary functions
coercion-table-cache: Private ordinary functions
coercion-table-p: Private ordinary functions
Compiler Macro, coerce: Public compiler macros
copy-coercion-table: Private ordinary functions

D
define-coercion: Public macros

F
Function, (setf coercion): Private ordinary functions
Function, (setf coercion-expression): Private ordinary functions
Function, (setf coercion-table-all): Private ordinary functions
Function, (setf coercion-table-cache): Private ordinary functions
Function, class-name-from-object: Private ordinary functions
Function, class-name-from-type-spec: Private ordinary functions
Function, coerce: Public ordinary functions
Function, coercion: Private ordinary functions
Function, coercion-expression: Private ordinary functions
Function, coercion-table-all: Private ordinary functions
Function, coercion-table-cache: Private ordinary functions
Function, coercion-table-p: Private ordinary functions
Function, copy-coercion-table: Private ordinary functions
Function, list-all-coercions: Public ordinary functions
Function, make-coercion-table: Private ordinary functions
Function, speed-more-than-debug-p: Private ordinary functions
Function, speed-more-than-safety-p: Private ordinary functions
Function, undefine-coercion: Public ordinary functions

L
list-all-coercions: Public ordinary functions

M
Macro, define-coercion: Public macros
Macro, named-lambda: Private macros
make-coercion-table: Private ordinary functions

N
named-lambda: Private macros

S
speed-more-than-debug-p: Private ordinary functions
speed-more-than-safety-p: Private ordinary functions

U
undefine-coercion: Public ordinary functions