This is the trivia Reference Manual, version 0.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:55:05 2024 GMT+0.
trivia/trivia.asd
trivia.balland2006/trivia.balland2006.asd
trivia.trivial/trivia.trivial.asd
trivia.level2/trivia.level2.asd
trivia.level1/trivia.level1.asd
trivia.level0/trivia.level0.asd
trivia.balland2006/package.lisp
trivia.balland2006/optimizer.lisp
trivia.balland2006/column-swapping.lisp
trivia.level2/package.lisp
trivia.level2/impl.lisp
trivia.level2/sugars.lisp
trivia.level2/derived.lisp
trivia.level2/derived-class.lisp
trivia.level2/derived2.lisp
trivia.level2/derived3.lisp
trivia.level2/derived-numbers.lisp
trivia.level2/arrays.lisp
trivia.level2/inline-pattern.lisp
trivia.level1/package.lisp
trivia.level1/impl.lisp
trivia.level0/package.lisp
trivia.level0/impl.lisp
The main system appears first, followed by any subsystem dependency.
trivia
NON-optimized pattern matcher compatible with OPTIMA, with extensible optimizer interface and clean codebase
Masataro Asai
LLGPL
0.1
trivia.balland2006
(system).
trivia.balland2006
Optimizer for Trivia based on (Balland 2006)
Masataro Asai
LLGPL
0.1
trivia.trivial
(system).
type-i
(system).
iterate
(system).
alexandria
(system).
package.lisp
(file).
optimizer.lisp
(file).
column-swapping.lisp
(file).
trivia.trivial
Base level system of Trivia with a trivial optimizer.
Systems that intend to enhance Trivia should depend on this package, not the TRIVIA system,
in order to avoid the circular dependency.
Masataro Asai
LLGPL
0.1
trivia.level2
(system).
trivia.level2
NON-optimized pattern matcher compatible with OPTIMA, with extensible optimizer interface and clean codebase
Masataro Asai
LLGPL
0.1
trivia.level1
(system).
lisp-namespace
(system).
closer-mop
(system).
trivial-cltl2
(system).
package.lisp
(file).
impl.lisp
(file).
sugars.lisp
(file).
derived.lisp
(file).
derived-class.lisp
(file).
derived2.lisp
(file).
derived3.lisp
(file).
derived-numbers.lisp
(file).
arrays.lisp
(file).
inline-pattern.lisp
(file).
trivia.level1
Core patterns of Trivia
Masataro Asai
LLGPL
0.1
trivia.level0
(system).
package.lisp
(file).
impl.lisp
(file).
trivia.level0
Bootstrapping Pattern Matching Library for implementing Trivia
Masataro Asai
LLGPL
0.1
alexandria
(system).
package.lisp
(file).
impl.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
trivia/trivia.asd
trivia.balland2006/trivia.balland2006.asd
trivia.trivial/trivia.trivial.asd
trivia.level2/trivia.level2.asd
trivia.level1/trivia.level1.asd
trivia.level0/trivia.level0.asd
trivia.balland2006/package.lisp
trivia.balland2006/optimizer.lisp
trivia.balland2006/column-swapping.lisp
trivia.level2/package.lisp
trivia.level2/impl.lisp
trivia.level2/sugars.lisp
trivia.level2/derived.lisp
trivia.level2/derived-class.lisp
trivia.level2/derived2.lisp
trivia.level2/derived3.lisp
trivia.level2/derived-numbers.lisp
trivia.level2/arrays.lisp
trivia.level2/inline-pattern.lisp
trivia.level1/package.lisp
trivia.level1/impl.lisp
trivia.level0/package.lisp
trivia.level0/impl.lisp
trivia.balland2006/trivia.balland2006.asd
trivia.balland2006
(system).
trivia.trivial/trivia.trivial.asd
trivia.trivial
(system).
trivia.balland2006/optimizer.lisp
package.lisp
(file).
trivia.balland2006
(system).
*optimization-timeout*
(special variable).
*trace-optimization*
(special variable).
apply-fusion
(function).
apply-interleaving
(function).
apply-swapping
(function).
fuse
(function).
fusiblep
(function).
interleave
(function).
swappable
(function).
*grounding-clause-limit*
(special variable).
*optimization-report-threshold*
(special variable).
apply-or-grounding
(function).
balland2006
(function).
divide-clauses
(function).
gen-union
(function).
gensym*
(function).
ground-or
(function).
grounding-limit-reached-p
(function).
swappable-rec
(function).
timeout-p
(function).
type-disjointp
(function).
type-equal
(function).
type-exhaustivep
(function).
trivia.balland2006/column-swapping.lisp
optimizer.lisp
(file).
trivia.balland2006
(system).
pattern-dependencies
(function).
pattern-dependent
(function).
find-tree
(function).
trivia.level2/impl.lisp
package.lisp
(file).
trivia.level2
(system).
*optimizer*
(special variable).
defoptimizer
(macro).
defpattern
(macro).
defpattern-inline
(macro).
generate-multi-matcher
(function).
in-optimizer
(macro).
inline-pattern-expand
(function).
match2
(macro).
match2*
(macro).
match2*+
(macro).
match2+
(macro).
pattern-expand
(function).
pattern-expand-1
(function).
pattern-expand-all
(function).
symbol-optimizer
(function).
(setf symbol-optimizer)
(function).
*inline-pattern-doc-table*
(special variable).
*inline-pattern-table*
(special variable).
*optimizer-doc-table*
(special variable).
*optimizer-table*
(special variable).
*pattern-doc-table*
(special variable).
*pattern-table*
(special variable).
expand-clause
(function).
expand-multipatterns
(function).
guard-pattern
(condition).
inline-pattern-boundp
(function).
inline-pattern-let
(macro).
inline-pattern-type
(type).
make-gensyms
(function).
mapcar1-with-next
(function).
optimizer-boundp
(function).
optimizer-let
(macro).
optimizer-type
(type).
pad
(function).
pattern-boundp
(function).
pattern-expand-all/lift
(function).
pattern-expand-all/lift0
(function).
pattern-let
(macro).
pattern-type
(type).
process-keyword-args
(function).
process-lambda-args
(function).
process-optional-args
(function).
process-rest-args
(function).
symbol-inline-pattern
(function).
(setf symbol-inline-pattern)
(function).
symbol-pattern
(function).
(setf symbol-pattern)
(function).
unbound-inline-pattern
(condition).
unbound-optimizer
(condition).
unbound-pattern
(condition).
variablep
(function).
wildcard
(condition).
wildcardp
(function).
trivia.level2/sugars.lisp
impl.lisp
(file).
trivia.level2
(system).
cmatch
(macro).
cmatch*
(macro).
defun-cmatch
(macro).
defun-cmatch*
(macro).
defun-ematch
(macro).
defun-ematch*
(macro).
defun-match
(macro).
defun-match*
(macro).
ematch
(macro).
ematch*
(macro).
if-match
(macro).
lambda-cmatch
(macro).
lambda-cmatch*
(macro).
lambda-cmatch1
(macro).
lambda-ematch
(macro).
lambda-ematch*
(macro).
lambda-ematch1
(macro).
lambda-match
(macro).
lambda-match*
(macro).
lambda-match1
(macro).
let-match
(macro).
let-match*
(macro).
let-match1
(macro).
match
(macro).
match*
(macro).
match-error
(condition).
match-error-pattern
(reader method).
match-error-patterns
(reader method).
match-error-values
(reader method).
multiple-value-cmatch
(macro).
multiple-value-ematch
(macro).
multiple-value-match
(macro).
unless-match
(macro).
when-match
(macro).
+match*-doc+
(special variable).
+match-doc+
(special variable).
+multiple-value-match-doc+
(special variable).
call-with-mvb-temp-vars
(function).
parse-matcher-body
(function).
trivia.level2/derived.lisp
sugars.lisp
(file).
trivia.level2
(system).
%define-hash-table-entries-pattern
(macro).
anonymize-level1-pattern
(function).
anonymize-pattern
(function).
combine-guard1-subpatterns
(function).
decompose-array-contents
(function).
expand-and
(function).
hash-table-odd-number-of-entries-warning
(condition).
negate-level1-pattern
(function).
type-of-form
(function).
type-of-quoted-form
(function).
trivia.level2/derived-class.lisp
derived.lisp
(file).
trivia.level2
(system).
*arity-check-by-test-call*
(special variable).
*test-call-argument*
(special variable).
predicate-p
(function).
predicatep
(function).
*arity-check-by-test-call-warning-shown*
(special variable).
accessor-form
(function).
accessor-form-on-built-in-class
(function).
accessor-form-on-class
(function).
accessor-form-on-structure
(function).
accessor-form-using-function
(function).
ambiguous-slot-error
(function).
ambiguous-slot-error
(condition).
easy-infer-type
(function).
find-effective-slot
(function).
find-reader
(function).
lambda-list-unary-p
(function).
map-accessors
(function).
parse-slots
(function).
unary-function-p
(function).
trivia.level2/derived2.lisp
derived-class.lisp
(file).
trivia.level2
(system).
trivia.level2/derived3.lisp
derived2.lisp
(file).
trivia.level2
(system).
compile-destructuring-pattern
(function).
compile-keyword-patterns
(function).
parse-lambda-list
(function).
take-while
(function).
variable-symbol
(type).
trivia.level2/derived-numbers.lisp
derived3.lisp
(file).
trivia.level2
(system).
trivia.level2/arrays.lisp
derived-numbers.lisp
(file).
trivia.level2
(system).
array-type-spec
(function).
common-specs
(function).
element-type-spec
(function).
set-vector-matcher
(function).
trivia.level2/inline-pattern.lisp
arrays.lisp
(file).
trivia.level2
(system).
trivia.level1/impl.lisp
package.lisp
(file).
trivia.level1
(system).
*lexvars*
(special variable).
*or-pattern-allow-unshared-variables*
(special variable).
*trace-dispatching*
(special variable).
conflicts
(reader method).
conflicts
(reader method).
(setf conflicts)
(writer method).
(setf conflicts)
(writer method).
correct-pattern
(function).
fail
(macro).
guard1-pattern-nonlinear
(condition).
match1
(macro).
next
(macro).
or1-pattern-inconsistency
(condition).
pattern
(reader method).
pattern
(reader method).
(setf pattern)
(writer method).
(setf pattern)
(writer method).
preprocess-symopts
(function).
skip
(macro).
trace-when
(macro).
variables
(function).
%correct-more-patterns
(function).
%match
(function).
%variables
(function).
%variables-more-patterns
(function).
*correct-pattern-cache*
(special variable).
bind-missing-vars-with-nil
(function).
correct-pattern*
(function).
destructure-guard1-subpatterns
(function).
ensure-getf
(macro).
gensym*
(function).
mapcar1-with-last
(function).
match-clause
(function).
match-clauses
(function).
merge-variables
(function).
place-pattern
(condition).
set-equal-or-error
(function).
union*
(function).
trivia.level0/package.lisp
trivia.level0
(system).
once-only
(macro).
trivia.level0/impl.lisp
package.lisp
(file).
trivia.level0
(system).
ematch0
(macro).
lambda-ematch0
(macro).
lambda-match0
(macro).
match0
(macro).
*bindings*
(special variable).
*env*
(special variable).
*what*
(special variable).
make-pattern-predicate
(function).
parse-patterns
(function).
Packages are listed by definition order.
trivia.level2.impl
trivia.level2
trivia.balland2006
trivia.skip
trivia.next
trivia.level0
trivia.fail
trivia.level1.impl
trivia.level1
trivia.level2.impl
alexandria
.
common-lisp
.
trivia.level0
.
trivia.level1
.
trivia.level2
.
trivia.next
.
predicate-p
(function).
predicatep
(function).
%define-hash-table-entries-pattern
(macro).
*arity-check-by-test-call-warning-shown*
(special variable).
*inline-pattern-doc-table*
(special variable).
*inline-pattern-table*
(special variable).
*optimizer-doc-table*
(special variable).
*optimizer-table*
(special variable).
*pattern-doc-table*
(special variable).
*pattern-table*
(special variable).
+match*-doc+
(special variable).
+match-doc+
(special variable).
+multiple-value-match-doc+
(special variable).
accessor-form
(function).
accessor-form-on-built-in-class
(function).
accessor-form-on-class
(function).
accessor-form-on-structure
(function).
accessor-form-using-function
(function).
ambiguous-slot-error
(function).
ambiguous-slot-error
(condition).
anonymize-level1-pattern
(function).
anonymize-pattern
(function).
array-type-spec
(function).
call-with-mvb-temp-vars
(function).
combine-guard1-subpatterns
(function).
common-specs
(function).
compile-destructuring-pattern
(function).
compile-keyword-patterns
(function).
decompose-array-contents
(function).
easy-infer-type
(function).
element-type-spec
(function).
expand-and
(function).
expand-clause
(function).
expand-multipatterns
(function).
find-effective-slot
(function).
find-reader
(function).
guard-pattern
(condition).
hash-table-odd-number-of-entries-warning
(condition).
inline-pattern-boundp
(function).
inline-pattern-let
(macro).
inline-pattern-type
(type).
lambda-list-unary-p
(function).
make-gensyms
(function).
map-accessors
(function).
mapcar1-with-next
(function).
negate-level1-pattern
(function).
optimizer-boundp
(function).
optimizer-let
(macro).
optimizer-type
(type).
pad
(function).
parse-lambda-list
(function).
parse-matcher-body
(function).
parse-slots
(function).
pattern-boundp
(function).
pattern-expand-all/lift
(function).
pattern-expand-all/lift0
(function).
pattern-let
(macro).
pattern-type
(type).
process-keyword-args
(function).
process-lambda-args
(function).
process-optional-args
(function).
process-rest-args
(function).
set-vector-matcher
(function).
symbol-inline-pattern
(function).
(setf symbol-inline-pattern)
(function).
symbol-pattern
(function).
(setf symbol-pattern)
(function).
take-while
(function).
type-of-form
(function).
type-of-quoted-form
(function).
unary-function-p
(function).
unbound-inline-pattern
(condition).
unbound-optimizer
(condition).
unbound-pattern
(condition).
variable-symbol
(type).
variablep
(function).
wildcard
(condition).
wildcardp
(function).
trivia.level2
trivia
trivia.balland2006
.
trivia.level2.impl
.
type-i
.
*arity-check-by-test-call*
(special variable).
*optimizer*
(special variable).
*test-call-argument*
(special variable).
cmatch
(macro).
cmatch*
(macro).
defoptimizer
(macro).
defpattern
(macro).
defpattern-inline
(macro).
defun-cmatch
(macro).
defun-cmatch*
(macro).
defun-ematch
(macro).
defun-ematch*
(macro).
defun-match
(macro).
defun-match*
(macro).
ematch
(macro).
ematch*
(macro).
generate-multi-matcher
(function).
if-match
(macro).
in-optimizer
(macro).
inline-pattern-expand
(function).
lambda-cmatch
(macro).
lambda-cmatch*
(macro).
lambda-cmatch1
(macro).
lambda-ematch
(macro).
lambda-ematch*
(macro).
lambda-ematch1
(macro).
lambda-match
(macro).
lambda-match*
(macro).
lambda-match1
(macro).
let-match
(macro).
let-match*
(macro).
let-match1
(macro).
match
(macro).
match*
(macro).
match-error
(condition).
match-error-pattern
(generic reader).
match-error-patterns
(generic reader).
match-error-values
(generic reader).
match2
(macro).
match2*
(macro).
match2*+
(macro).
match2+
(macro).
multiple-value-cmatch
(macro).
multiple-value-ematch
(macro).
multiple-value-match
(macro).
pattern-expand
(function).
pattern-expand-1
(function).
pattern-expand-all
(function).
symbol-optimizer
(function).
(setf symbol-optimizer)
(function).
unless-match
(macro).
when-match
(macro).
trivia.balland2006
alexandria
.
common-lisp
.
iterate
.
trivia.level1
.
trivia.level2
.
trivia.skip
.
type-i
.
*optimization-timeout*
(special variable).
*trace-optimization*
(special variable).
apply-fusion
(function).
apply-interleaving
(function).
apply-swapping
(function).
fuse
(function).
fusiblep
(function).
interleave
(function).
pattern-dependencies
(function).
pattern-dependent
(function).
swappable
(function).
*grounding-clause-limit*
(special variable).
*optimization-report-threshold*
(special variable).
apply-or-grounding
(function).
balland2006
(function).
divide-clauses
(function).
find-tree
(function).
gen-union
(function).
gensym*
(function).
ground-or
(function).
grounding-limit-reached-p
(function).
swappable-rec
(function).
timeout-p
(function).
type-disjointp
(function).
type-equal
(function).
type-exhaustivep
(function).
trivia.level0
common-lisp
.
ematch0
(macro).
lambda-ematch0
(macro).
lambda-match0
(macro).
match0
(macro).
*bindings*
(special variable).
*env*
(special variable).
*what*
(special variable).
make-pattern-predicate
(function).
once-only
(macro).
parse-patterns
(function).
trivia.level1.impl
alexandria
.
common-lisp
.
trivia.fail
.
trivia.level0
.
trivia.level1
.
trivia.next
.
trivia.skip
.
%correct-more-patterns
(function).
%match
(function).
%variables
(function).
%variables-more-patterns
(function).
*correct-pattern-cache*
(special variable).
bind-missing-vars-with-nil
(function).
correct-pattern*
(function).
destructure-guard1-subpatterns
(function).
ensure-getf
(macro).
gensym*
(function).
mapcar1-with-last
(function).
match-clause
(function).
match-clauses
(function).
merge-variables
(function).
place-pattern
(condition).
set-equal-or-error
(function).
union*
(function).
trivia.level1
*lexvars*
(special variable).
*or-pattern-allow-unshared-variables*
(special variable).
*trace-dispatching*
(special variable).
conflicts
(generic reader).
(setf conflicts)
(generic writer).
correct-pattern
(function).
guard1-pattern-nonlinear
(condition).
match1
(macro).
or1-pattern-inconsistency
(condition).
pattern
(slot).
pattern
(generic reader).
(setf pattern)
(generic writer).
preprocess-symopts
(function).
trace-when
(macro).
variables
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
If enabled (non-nil), UNARY-FUNCTION-P tests the arity of the candidate accessor function by FUNCALLing it with *TEST-CALL-ARGUMENT* (see the docstring of *TEST-CALL-ARGUMENT*).
PROGRAM-ERROR is treated as a reason of rejection; A function of arity != 1.
Other errors, as well as completion of the call without errors, are treated as a success.
List of symbol-and-options in the current parsing context.
Optimization timeout in seconds. It matters for a very complex pattern
An argument used to call the candidate function in UNARY-FUNCTION-P. See *ARITY-CHECK-BY-TEST-CALL* for details.
Used only for debugging. When non-nil, test-form for pattern matching is printed on the stream.
if non-nil, prints the debug information
Syntax:
[e|c]?match argument &body {clause}* -> result
- argument : a form, evaluated.
- clause : ( pattern &body {bodyform}* )
- pattern : a pattern language.
- bodyform : an implicit progn.
Matches argument against the patterns provided in clauses. Evaluate the bodyform
of the first clause whose pattern matches against argument. bodyform is treated
as an implicit progn.
- In MATCH, if no clauses have matched the given argument, returns nil.
- In EMATCH, if no clauses have matched the given argument, ematch signals an error MATCH-ERROR.
- In CMATCH, if no clauses have matched the given argument, cmatch signals a correctable MATCH-ERROR.
Syntax:
[e|c]?match* (&rest arguments) &body {multiclause}* -> result
- arguments : a list of forms, evaluated.
- multiclause : ((&rest patterns) &body {bodyform}* )
- patterns : a list of pattern languages.
- bodyform : an implicit progn.
Arguments are evaluated in left-to-right manner, and the patterns are matched
against the results of evaluation of arguments in left-to-right manner. Evaluate
the bodyform of the first clause whose patterns match successfully.
When the number of patterns in a clause is insufficient, it is padded with
wildcard patterns, i.e., no check is conducted. In contrast, excessive number of
patterns will signal a compile-time error.
- In MATCH*, if no clauses have matched the given argument, returns nil.
- In EMATCH*, if no clauses have matched the given argument, ematch signals an error MATCH-ERROR.
- In CMATCH*, if no clauses have matched the given argument, cmatch signals a correctable MATCH-ERROR.
Adds a new derived pattern.
The default value of &optional arguments are ’_, instead of nil.
Adds a new inlined derived pattern. These patterns are evaluated from the innermost ones. The default value of &optional arguments are ’_, instead of nil.
Equivalent to (defun (arg) [decl-and-docstring] (cmatch arg (PATTERN BODY...))).
Equivalent to (defun (arg) [decl-and-docstring] (cmatch arg (PATTERN BODY...))).
Equivalent to (defun (arg) [decl-and-docstring] (ematch arg (PATTERN BODY...))).
Equivalent to (defun (arg) [decl-and-docstring] (ematch arg (PATTERN BODY...))).
Equivalent to (defun (arg) [decl-and-docstring] (match arg (PATTERN BODY...))).
Equivalent to (defun (arg) [decl-and-docstring] (match arg (PATTERN BODY...))).
Syntax:
[e|c]?match argument &body {clause}* -> result
- argument : a form, evaluated.
- clause : ( pattern &body {bodyform}* )
- pattern : a pattern language.
- bodyform : an implicit progn.
Matches argument against the patterns provided in clauses. Evaluate the bodyform
of the first clause whose pattern matches against argument. bodyform is treated
as an implicit progn.
- In MATCH, if no clauses have matched the given argument, returns nil.
- In EMATCH, if no clauses have matched the given argument, ematch signals an error MATCH-ERROR.
- In CMATCH, if no clauses have matched the given argument, cmatch signals a correctable MATCH-ERROR.
Syntax:
[e|c]?match* (&rest arguments) &body {multiclause}* -> result
- arguments : a list of forms, evaluated.
- multiclause : ((&rest patterns) &body {bodyform}* )
- patterns : a list of pattern languages.
- bodyform : an implicit progn.
Arguments are evaluated in left-to-right manner, and the patterns are matched
against the results of evaluation of arguments in left-to-right manner. Evaluate
the bodyform of the first clause whose patterns match successfully.
When the number of patterns in a clause is insufficient, it is padded with
wildcard patterns, i.e., no check is conducted. In contrast, excessive number of
patterns will signal a compile-time error.
- In MATCH*, if no clauses have matched the given argument, returns nil.
- In EMATCH*, if no clauses have matched the given argument, ematch signals an error MATCH-ERROR.
- In CMATCH*, if no clauses have matched the given argument, cmatch signals a correctable MATCH-ERROR.
Equivalent to (match ARG (PATTERN THEN) (_ ELSE)).
Equivalent to (lambda (arg) (cmatch arg BODY...)).
Equivalent to (lambda (args...) (cmatch* (args...) BODY...)).
Equivalent to (lambda (arg) (cmatch arg (PATTERN BODY...))).
Equivalent to (lambda (arg) (ematch arg BODY...)).
Equivalent to (lambda (args...) (ematch* (args...) BODY...)).
Equivalent to (lambda (arg) (ematch arg (PATTERN BODY...))).
Equivalent to (lambda (arg) (match arg BODY...)).
Equivalent to (lambda (args...) (match* (args...) BODY...)).
Equivalent to (lambda (arg) (match arg (PATTERN BODY...))).
Similar to LET, except not only a variable but also a pattern can be used in BINDINGS.
Similar to LET-MATCH but matches sequentially.
Equivalent to (let-match ((PATTERN ARG)) BODY...).
Syntax:
[e|c]?match argument &body {clause}* -> result
- argument : a form, evaluated.
- clause : ( pattern &body {bodyform}* )
- pattern : a pattern language.
- bodyform : an implicit progn.
Matches argument against the patterns provided in clauses. Evaluate the bodyform
of the first clause whose pattern matches against argument. bodyform is treated
as an implicit progn.
- In MATCH, if no clauses have matched the given argument, returns nil.
- In EMATCH, if no clauses have matched the given argument, ematch signals an error MATCH-ERROR.
- In CMATCH, if no clauses have matched the given argument, cmatch signals a correctable MATCH-ERROR.
Syntax:
[e|c]?match* (&rest arguments) &body {multiclause}* -> result
- arguments : a list of forms, evaluated.
- multiclause : ((&rest patterns) &body {bodyform}* )
- patterns : a list of pattern languages.
- bodyform : an implicit progn.
Arguments are evaluated in left-to-right manner, and the patterns are matched
against the results of evaluation of arguments in left-to-right manner. Evaluate
the bodyform of the first clause whose patterns match successfully.
When the number of patterns in a clause is insufficient, it is padded with
wildcard patterns, i.e., no check is conducted. In contrast, excessive number of
patterns will signal a compile-time error.
- In MATCH*, if no clauses have matched the given argument, returns nil.
- In EMATCH*, if no clauses have matched the given argument, ematch signals an error MATCH-ERROR.
- In CMATCH*, if no clauses have matched the given argument, cmatch signals a correctable MATCH-ERROR.
In match2/match2*, the last clause is not enclosed in a block.
Therefore, using ‘next’ in the last clause results in jumping to the next innermost matching construct,
or results in a compilation error when this is the outermost matching construct.
In match2/match2*, the last clause is not enclosed in a block.
Therefore, using ‘next’ in the last clause results in jumping to the next innermost matching construct,
or results in a compilation error when this is the outermost matching construct.
Variant of match2* : can specify the inferred types of each argument
Variant of match2 : can specify the inferred type of the argument
Syntax:
multiple-value-[e|c]?match values-form &body {multiclause}* -> result
- values-form : a form producing multiple values, evaluated.
- multiclause : ((&rest patterns) &body {bodyform}* )
- patterns : a list of pattern languages.
- bodyform : an implicit progn.
Similar to match*, but this is for multiple values. values-form is evaluated, and
each of the returned values are matched against the patterns provided
in multiclauses in left-to-right manner.
Evaluate the bodyform of the first clause whose patterns match successfully.
When the form returned more values than the number of patterns, excessive values are ignored.
When the form returned less values than the number of patterns, excessive patterns are matched against nil.
- In multiple-value-match, if no clauses have matched the given argument, returns nil.
- In multiple-value-ematch, if no clauses have matched the given argument, ematch signals an error MATCH-ERROR.
- In multiple-value-cmatch, if no clauses have matched the given argument, cmatch signals a correctable MATCH-ERROR.
Syntax:
multiple-value-[e|c]?match values-form &body {multiclause}* -> result
- values-form : a form producing multiple values, evaluated.
- multiclause : ((&rest patterns) &body {bodyform}* )
- patterns : a list of pattern languages.
- bodyform : an implicit progn.
Similar to match*, but this is for multiple values. values-form is evaluated, and
each of the returned values are matched against the patterns provided
in multiclauses in left-to-right manner.
Evaluate the bodyform of the first clause whose patterns match successfully.
When the form returned more values than the number of patterns, excessive values are ignored.
When the form returned less values than the number of patterns, excessive patterns are matched against nil.
- In multiple-value-match, if no clauses have matched the given argument, returns nil.
- In multiple-value-ematch, if no clauses have matched the given argument, ematch signals an error MATCH-ERROR.
- In multiple-value-cmatch, if no clauses have matched the given argument, cmatch signals a correctable MATCH-ERROR.
Syntax:
multiple-value-[e|c]?match values-form &body {multiclause}* -> result
- values-form : a form producing multiple values, evaluated.
- multiclause : ((&rest patterns) &body {bodyform}* )
- patterns : a list of pattern languages.
- bodyform : an implicit progn.
Similar to match*, but this is for multiple values. values-form is evaluated, and
each of the returned values are matched against the patterns provided
in multiclauses in left-to-right manner.
Evaluate the bodyform of the first clause whose patterns match successfully.
When the form returned more values than the number of patterns, excessive values are ignored.
When the form returned less values than the number of patterns, excessive patterns are matched against nil.
- In multiple-value-match, if no clauses have matched the given argument, returns nil.
- In multiple-value-ematch, if no clauses have matched the given argument, ematch signals an error MATCH-ERROR.
- In multiple-value-cmatch, if no clauses have matched the given argument, cmatch signals a correctable MATCH-ERROR.
Evaluate and print the result of the form when *trace-dispatching* is non-nil.
Equivalent to (match ARG (PATTERN) (_ BODY...)).
Equivalent to (match ARG (PATTERN BODY...)).
Given a pattern p, returns a list of patterns that should be inlined.
return true if p2 depends on p1
expand the given pattern downto level1 pattern (i.e. until no expansion is available), just like macroexpand
expand the given pattern once, just like macroexpand-1. Returns (values expansion-form expanded-p)
expand the given pattern recursively
Ensure the symopts being a list, plus sets some default values.
Automatically defined getter function. When DEFAULT is supplied, the value is set automatically.
Automatically defined setter function.
guard1-pattern-nonlinear
)) ¶guard1-pattern-nonlinear
)) ¶or1-pattern-inconsistency
)) ¶or1-pattern-inconsistency
)) ¶match-error
)) ¶match-error
)) ¶match-error
)) ¶guard1-pattern-nonlinear
)) ¶guard1-pattern-nonlinear
)) ¶or1-pattern-inconsistency
)) ¶or1-pattern-inconsistency
)) ¶A flag which controls the style-warning produced by using *arity-check-by-test-call*.
The limit for grounding the OR patterns. If the grounding resulted in clauses more than this limit, it undoes the grounding.
Prints the runtime of optimization passes when it exceeds this limit
given a pattern, traverse the matching tree and returns a list of variables bounded by guard1 pattern. Temporary symbols are not accounted.
used when the type is a class, structure etc.
Recursively anonymize the given pattern. Only accepts guard1 and or1 patterns
Deduce the rank from array DIMENSIONS, then normalize and check the consistency of the specification. For example, DIMENSION = ’(1 2 3) and RANK = 2 is inconsistent, the RANK should be 3.
Recursively check and try to correct the mismatch in the set of variables in or1 patterns
same thing as in type-i:unary-function. copied here in order to remove dependency
Automatically defined boolean function.
Recursively anonymize the given pattern. Only accepts guard1 and or1 patterns
Automatically defined boolean function.
canonicalize the slot into (symbol pattern) form
Automatically defined boolean function.
Expand the given pattern recursively. On encoutnering a guard pattern, it lifts its condition.
Expand the given pattern recursively. On encoutnering a guard pattern,
it accumulates its condition into a list.
Returns two values: the pattern without guarded conditions, and a list of conditions.
Automatically defined getter function. When DEFAULT is supplied, the value is set automatically.
Automatically defined setter function.
Automatically defined getter function. When DEFAULT is supplied, the value is set automatically.
Automatically defined setter function.
Checks if predicate returns true, for each element of a list.
Collect the elements until it returns false.
Returns the collected elements and the remaining elements.
If the list exhausted by cdr of the list being an atom (not necessarily nil),
then similarly returns the collected elements and the atom, which might be nil in case of regular list,
or otherwise it can be anything (e.g. (take-while ’(a . b) (constantly t)) returns (values ’(a) ’b)).
Returns true for types under, t1, t2, if under = t1 + t2 and nothing more
Returns a type of FORM.
When WEAK is non-nil, it returns a decomposed type of the quoted cons cells instead of eql type for the cons object itself.
Note that this is equivalent to the full type-inference mechanism, so we are reinventing a wheel here.
test if a function is unary.
simple-error
.
signaled when a guard pattern is found.
simple-style-warning
.
condition
.
unbound-variable
.
unbound-variable
.
unbound-variable
.
signaled when a wildcard pattern is found. pattern-expand-all receives it and removes the pattern
condition
.
Jump to: | %
(
A B C D E F G I L M N O P S T U V W |
---|
Jump to: | %
(
A B C D E F G I L M N O P S T U V W |
---|
Jump to: | *
+
C P S T V |
---|
Jump to: | *
+
C P S T V |
---|
Jump to: | A C D F G H I M O P S T U V W |
---|
Jump to: | A C D F G H I M O P S T U V W |
---|