This is the cl-algebraic-data-type Reference Manual, version 1.2.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Tue Jul 15 03:33:50 2025 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-algebraic-data-typeA library for algebraic data types.
Robert Smith <robert@stylewarning.com>
BSD 3-clause
1.2.0
alexandria (system).
global-vars (system).
license.txt (file).
package.lisp (file).
utilities.lisp (file).
defdata.lisp (file).
match.lisp (file).
do-notation.lisp (file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-algebraic-data-type/cl-algebraic-data-type.asdcl-algebraic-data-type/package.lispcl-algebraic-data-type/utilities.lispcl-algebraic-data-type/defdata.lispcl-algebraic-data-type/match.lispcl-algebraic-data-type/do-notation.lispcl-algebraic-data-type/cl-algebraic-data-type.asdcl-algebraic-data-type (system).
cl-algebraic-data-type/package.lisplicense.txt (file).
cl-algebraic-data-type (system).
cl-algebraic-data-type/utilities.lisppackage.lisp (file).
cl-algebraic-data-type (system).
algebraic-data-type (structure).
algebraic-data-type-p (function).
algebraic-data-value-p (function).
get-constructors (function).
define-constant (macro).
ensure-car (function).
ensure-list (function).
field (function).
gen-names (function).
internal (function).
property-list-p (function).
set-constructors (function).
unsplice (function).
unwrap-singletons (function).
wild? (function).
cl-algebraic-data-type/defdata.lisputilities.lisp (file).
cl-algebraic-data-type (system).
*print-adt-readably* (special variable).
defdata (macro).
set-data (macro).
with-data (macro).
cl-algebraic-data-type/match.lispdefdata.lisp (file).
cl-algebraic-data-type (system).
match (macro).
duplicates (function).
cl-algebraic-data-type/do-notation.lispmatch.lisp (file).
cl-algebraic-data-type (system).
do-notation (macro).
Packages are listed by definition order.
cl-algebraic-data-typeA package for defining algebraic data types.
adt
common-lisp.
*print-adt-readably* (special variable).
algebraic-data-type (structure).
algebraic-data-type-p (function).
algebraic-data-value-p (function).
defdata (macro).
get-constructors (function).
match (macro).
set-data (macro).
with-data (macro).
define-constant (macro).
do-notation (macro).
duplicates (function).
ensure-car (function).
ensure-list (function).
field (function).
gen-names (function).
internal (function).
property-list-p (function).
set-constructors (function).
unsplice (function).
unwrap-singletons (function).
wild? (function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Print preceding #. when printing ADT values.
Define a new ADT. ADT-name has the following grammar:
ADT-NAME := <symbol>
| (<symbol> <options>*)
There is no difference between specifying it as a symbol or as a
singleton list. There are two possible options, specified as a
property list:
* :MUTABLE {T, NIL} (default: NIL): Specifies whether the fields
of the type are mutable, allowing the use of SET-DATA.
* :INCLUDE <adt-type>: Specifies whether another defined ADT
should be inherited.
Constructors is a list of clauses with the following grammar:
<clause> := <symbol>
| (<symbol> <type-specifier>*)
Each clause defines a constructor for the ADT. Nullary constructors will define constants and all other constructors will define functions.
Perform pattern matching on OBJ with (adt-type) ADT.
Each clause must have the following syntax:
<var> := <symbol> | ’_’
<lhs> := ’_’
| (<symbol> <var>*)
<clause> := (<lhs> <lisp code>)
The symbol ’_’ denotes a wildcard, as well as a fallthough.
Note that pattern matching is only shallow (patterns are one-level deep).
Mutate the fields of the ADT value OBJ whose constructor is NAME and whose updated values are NEW-VALUES based on order. If the symbol ’_’ is used as a value, that field is not updated. Trailing ’_’ may be omitted.
Destructure the ADT value OBJ, whose constructor is NAME. VARS must be symbol which will be bound, or they must be the symbol ’_’, which means the value will not be bound.
Is TYPE a known algebraic data type?
Is the value VALUE that of some algebraic data type?
Get the constructors and their arity for the adt ADT. Two values will be returned:
1. If the ADT exists, then a list of pairs
(CONSTRUCTOR-SYMBOL ARITY).
If the ARITY is zero, then the CONSTRUCTOR-SYMBOL is a value as opposed to a function.
2. T if the ADT exists, NIL otherwise. This mimics the behavior of GETHASH.
Abstract type for all algebraic data types, primarily used to identify such types.
structure-object.
Given a BIND-FUNCTION and all the bind expressions, evaluate BODY.
| Jump to: | A D E F G I M P S U W |
|---|
| Jump to: | A D E F G I M P S U W |
|---|
| Jump to: | *
S |
|---|
| Index Entry | Section | ||
|---|---|---|---|
| | |||
| * | |||
*print-adt-readably*: | Public special variables | ||
| | |||
| S | |||
Special Variable, *print-adt-readably*: | Public special variables | ||
| | |||
| Jump to: | *
S |
|---|
| Jump to: | A C D F L M P S U |
|---|
| Jump to: | A C D F L M P S U |
|---|