The shadchen Reference Manual

This is the shadchen Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 06:41:05 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

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


2.1 shadchen

A pattern matching library.

Maintainer

Vincent Toups

Author

Vincent Toups

Long Description

Shadchen (matchmaker) is a Racket-inspired pattern matching library.

Source

shadchen.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 shadchen/shadchen.asd

Source

shadchen.asd.

Parent Component

shadchen (system).

ASDF Systems

shadchen.


3.1.2 shadchen/package.lisp

Source

shadchen.asd.

Parent Component

shadchen (system).

Packages

shadchen.


3.1.3 shadchen/shadchen.lisp

Dependency

package.lisp (file).

Source

shadchen.asd.

Parent Component

shadchen (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 shadchen

Source

package.lisp.

Nickname

s?

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: defpattern (name args &body body)
Package

shadchen.

Source

shadchen.lisp.

Macro: defun-match (name patterns &body body)
Package

shadchen.

Source

shadchen.lisp.

Macro: defun-match- (name patterns &body body)
Package

shadchen.

Source

shadchen.lisp.

Macro: match (value &body forms)

Attempt to match VALUE against each of the patterns in the CAR of FORMS. When a match is detected, its subsequent forms are executed as in a PROGN where the bindings implied by the match are in effect.

An error is thrown when no matches are found.

Package

shadchen.

Source

shadchen.lisp.

Macro: match-lambda (&body forms)

Like MATCH except the VALUE is curried.

Package

shadchen.

Source

shadchen.lisp.

Macro: match-let (bindings &body body)

Just like let* but each symbol part of each binding can be a match expression of arbitrary complexity.

Package

shadchen.

Source

shadchen.lisp.

Macro: match-let* (bindings &body body)

Just like let* but each symbol part of each binding can be a match expression of arbitrary complexity.

Package

shadchen.

Source

shadchen.lisp.

Macro: match-loop (recur-point bindings &body body)

Like match-let but the binding form can be re-entered by calling
a local function indicated by ‘recur-point‘ with the same number of arguments as bindings expressions in BINDINGS.

Package

shadchen.

Source

shadchen.lisp.


5.2 Internals


5.2.1 Special variables

Special Variable: *extended-patterns*

Holds user declared patterns.

Package

shadchen.

Source

shadchen.lisp.

Special Variable: *match-fail*
Package

shadchen.

Source

shadchen.lisp.

Special Variable: *match-function-table*
Package

shadchen.

Source

shadchen.lisp.


5.2.2 Macros

Macro: match-helper (value &body forms)
Package

shadchen.

Source

shadchen.lisp.

Macro: match1 (match-expression match-value &body body)
Package

shadchen.

Source

shadchen.lisp.

Macro: named-let (name binders &body body)
Package

shadchen.

Source

shadchen.lisp.


5.2.3 Ordinary functions

Function: bq->regular-match (bq-expression)
Package

shadchen.

Source

shadchen.lisp.

Function: calc-backquote-bindings (expr)

Calculate the bindings for a backquote expression.

Package

shadchen.

Source

shadchen.lisp.

Function: calc-pattern-bindings (expr)

Given a shadchen pattern EXPR return a list of symbols bound by that expression.

Package

shadchen.

Source

shadchen.lisp.

Function: calc-pattern-bindings-extended (expr)

Calculate the bound symbols of a user defined pattern.

Package

shadchen.

Source

shadchen.lisp.

Function: calc-pattern-bindings-list (expr &optional acc)
Package

shadchen.

Source

shadchen.lisp.

Function: canonical-binding-list (l)
Package

shadchen.

Source

shadchen.lisp.

Function: copy-match-fail-struct (instance)
Package

shadchen.

Source

shadchen.lisp.

Function: equal-by-binding (&rest patterns)
Package

shadchen.

Source

shadchen.lisp.

Function: equal-by-binding2 (p1 p2)
Package

shadchen.

Source

shadchen.lisp.

Function: extend-defun-match-table (name lexpr)
Package

shadchen.

Source

shadchen.lisp.

Function: extended-patternp (pattern-head)

Return T if PATTERN-HEAD indicates a user provided pattern.

Package

shadchen.

Source

shadchen.lisp.

Function: htbl-fetcher (key)
Package

shadchen.

Source

shadchen.lisp.

Function: length=1 (lst)

Returns T when LST has one element.

Package

shadchen.

Source

shadchen.lisp.

Function: make-match-fail-struct (&key)
Package

shadchen.

Source

shadchen.lisp.

Function: mapcat (f lst)
Package

shadchen.

Source

shadchen.lisp.

Function: match-?-expander (match-expression match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-and-expander (match-expression match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-and-expander* (sub-expressions match-name body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-backquote-expander (match-expression match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-cons-expander (match-expression match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-extended-pattern-expander (match-expression match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-fail-struct-p (object)
Package

shadchen.

Source

shadchen.lisp.

Function: match-funcall-expander (match-expression match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-let-expander (match-expression match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-list-expander (match-expression match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-list-expander* (sub-expressions match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-literal-character (match-expression match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-literal-keyword (match-expression match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-literal-number (match-expression match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-literal-string (match-expression match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-must-match-expander (match-expr val-expr body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-or-expander (match-expression match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-or-expander-unsafe (match-expression match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-quote-expander (match-expression match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: match-values-expander (match-expression match-value body)
Package

shadchen.

Source

shadchen.lisp.

Function: must-match-case (match-expr)
Package

shadchen.

Source

shadchen.lisp.

Function: non-keyword-symbol (o)
Package

shadchen.

Source

shadchen.lisp.

Function: package-name* (p)
Package

shadchen.

Source

shadchen.lisp.

Function: symbol< (s1 s2)
Package

shadchen.

Source

shadchen.lisp.

Function: uq? (e)
Package

shadchen.

Source

shadchen.lisp.


5.2.4 Structures

Structure: match-fail-struct
Package

shadchen.

Source

shadchen.lisp.

Direct superclasses

structure-object.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   B   C   D   E   F   H   L   M   N   P   S   U  
Index Entry  Section

B
bq->regular-match: Private ordinary functions

C
calc-backquote-bindings: Private ordinary functions
calc-pattern-bindings: Private ordinary functions
calc-pattern-bindings-extended: Private ordinary functions
calc-pattern-bindings-list: Private ordinary functions
canonical-binding-list: Private ordinary functions
copy-match-fail-struct: Private ordinary functions

D
defpattern: Public macros
defun-match: Public macros
defun-match-: Public macros

E
equal-by-binding: Private ordinary functions
equal-by-binding2: Private ordinary functions
extend-defun-match-table: Private ordinary functions
extended-patternp: Private ordinary functions

F
Function, bq->regular-match: Private ordinary functions
Function, calc-backquote-bindings: Private ordinary functions
Function, calc-pattern-bindings: Private ordinary functions
Function, calc-pattern-bindings-extended: Private ordinary functions
Function, calc-pattern-bindings-list: Private ordinary functions
Function, canonical-binding-list: Private ordinary functions
Function, copy-match-fail-struct: Private ordinary functions
Function, equal-by-binding: Private ordinary functions
Function, equal-by-binding2: Private ordinary functions
Function, extend-defun-match-table: Private ordinary functions
Function, extended-patternp: Private ordinary functions
Function, htbl-fetcher: Private ordinary functions
Function, length=1: Private ordinary functions
Function, make-match-fail-struct: Private ordinary functions
Function, mapcat: Private ordinary functions
Function, match-?-expander: Private ordinary functions
Function, match-and-expander: Private ordinary functions
Function, match-and-expander*: Private ordinary functions
Function, match-backquote-expander: Private ordinary functions
Function, match-cons-expander: Private ordinary functions
Function, match-extended-pattern-expander: Private ordinary functions
Function, match-fail-struct-p: Private ordinary functions
Function, match-funcall-expander: Private ordinary functions
Function, match-let-expander: Private ordinary functions
Function, match-list-expander: Private ordinary functions
Function, match-list-expander*: Private ordinary functions
Function, match-literal-character: Private ordinary functions
Function, match-literal-keyword: Private ordinary functions
Function, match-literal-number: Private ordinary functions
Function, match-literal-string: Private ordinary functions
Function, match-must-match-expander: Private ordinary functions
Function, match-or-expander: Private ordinary functions
Function, match-or-expander-unsafe: Private ordinary functions
Function, match-quote-expander: Private ordinary functions
Function, match-values-expander: Private ordinary functions
Function, must-match-case: Private ordinary functions
Function, non-keyword-symbol: Private ordinary functions
Function, package-name*: Private ordinary functions
Function, symbol<: Private ordinary functions
Function, uq?: Private ordinary functions

H
htbl-fetcher: Private ordinary functions

L
length=1: Private ordinary functions

M
Macro, defpattern: Public macros
Macro, defun-match: Public macros
Macro, defun-match-: Public macros
Macro, match: Public macros
Macro, match-helper: Private macros
Macro, match-lambda: Public macros
Macro, match-let: Public macros
Macro, match-let*: Public macros
Macro, match-loop: Public macros
Macro, match1: Private macros
Macro, named-let: Private macros
make-match-fail-struct: Private ordinary functions
mapcat: Private ordinary functions
match: Public macros
match-?-expander: Private ordinary functions
match-and-expander: Private ordinary functions
match-and-expander*: Private ordinary functions
match-backquote-expander: Private ordinary functions
match-cons-expander: Private ordinary functions
match-extended-pattern-expander: Private ordinary functions
match-fail-struct-p: Private ordinary functions
match-funcall-expander: Private ordinary functions
match-helper: Private macros
match-lambda: Public macros
match-let: Public macros
match-let*: Public macros
match-let-expander: Private ordinary functions
match-list-expander: Private ordinary functions
match-list-expander*: Private ordinary functions
match-literal-character: Private ordinary functions
match-literal-keyword: Private ordinary functions
match-literal-number: Private ordinary functions
match-literal-string: Private ordinary functions
match-loop: Public macros
match-must-match-expander: Private ordinary functions
match-or-expander: Private ordinary functions
match-or-expander-unsafe: Private ordinary functions
match-quote-expander: Private ordinary functions
match-values-expander: Private ordinary functions
match1: Private macros
must-match-case: Private ordinary functions

N
named-let: Private macros
non-keyword-symbol: Private ordinary functions

P
package-name*: Private ordinary functions

S
symbol<: Private ordinary functions

U
uq?: Private ordinary functions