The anaphora Reference Manual

Table of Contents

Next: , Previous: , Up: (dir)   [Contents][Index]

The anaphora Reference Manual

This is the anaphora Reference Manual, version 0.9.6, generated automatically by Declt version 2.4 "Will Decker" on Wed Jun 20 10:44:54 2018 GMT+0.


Next: , Previous: , Up: Top   [Contents][Index]

1 Introduction

Anaphora

Anaphora is the anaphoric macro collection from Hell: it includes many new fiends in addition to old friends like AIF and AWHEN. Anaphora has been placed in Public Domain by the author, Nikodemus Siivola.

Installation

Use quicklisp, and simply:

CL-USER(1): (ql:quickload "anaphora")

Documentation

Anaphoric macros provide implicit bindings for various operations. Extensive use of anaphoric macros is not good style, and probably makes you go blind as well — there's a reason why Anaphora claims to be from Hell.

Anaphora provides two families of anaphoric macros, which can be identified by their names and packages (both families are also exported from the package ANAPHORA). The implicitly-bound symbol ANAPHORA:IT is also exported from all three packages.

Basic anaphora

Exported from package ANAPHORA-BASIC

These bind their first argument to IT via LET. In case of COND all clauses have their test-values bound to IT.

Variants: AAND, ALET, APROG1, AIF, ACOND, AWHEN, ACASE, ACCASE, AECASE, ATYPECASE, ACTYPECASE, and AETYPECASE.

Symbol-macro anaphora

Exported from package ANAPHORA-SYMBOL

These bind their first argument (unevaluated) to IT via SYMBOL-MACROLET.

Variants: SOR, SLET, SIF, SCOND, SUNLESS, SWHEN, SCASE, SCCASE, SECASE, STYPECASE, SCTYPECASE, SETYPECASE.

Also: ASIF, which binds via LET for the then-clause, and SYMBOL-MACROLET for the else-clause


Next: , Previous: , Up: Top   [Contents][Index]

2 Systems

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


Previous: , Up: Systems   [Contents][Index]

2.1 anaphora

Author

Nikodemus Siivola <nikodemus@random-state.net>

License

Public Domain

Description

The Anaphoric Macro Package from Hell

Version

0.9.6

Source

anaphora.asd (file)

Components

Next: , Previous: , Up: Top   [Contents][Index]

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


Previous: , Up: Files   [Contents][Index]

3.1 Lisp


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.1 anaphora.asd

Location

anaphora.asd

Systems

anaphora (system)


Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.2 anaphora/packages.lisp

Parent

anaphora (system)

Location

packages.lisp

Packages

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.3 anaphora/early.lisp

Dependency

packages.lisp (file)

Parent

anaphora (system)

Location

early.lisp

Internal Definitions

Next: , Previous: , Up: Lisp files   [Contents][Index]

3.1.4 anaphora/symbolic.lisp

Dependency

early.lisp (file)

Parent

anaphora (system)

Location

symbolic.lisp

Internal Definitions

Previous: , Up: Lisp files   [Contents][Index]

3.1.5 anaphora/anaphora.lisp

Dependency

symbolic.lisp (file)

Parent

anaphora (system)

Location

anaphora.lisp

Exported Definitions

Next: , Previous: , Up: Top   [Contents][Index]

4 Packages

Packages are listed by definition order.


Next: , Previous: , Up: Packages   [Contents][Index]

4.1 anaphora-symbol

ANAPHORA-SYMBOL provides “symbolic anaphoric macros”, which bind forms
to IT via SYMBOL-MACROLET.

Examples:

(sor (gethash key table) (setf it default))

(asif (gethash key table)
(foo it) ; IT is a value bound by LET here
(setf it default)) ; IT is the GETHASH form bound by SYMBOL-MACROLET here

Source

packages.lisp (file)

Use List

Next: , Previous: , Up: Packages   [Contents][Index]

4.2 anaphora-basic

ANAPHORA-BASIC provides all normal anaphoric constructs, which bind primary values to IT.

Source

packages.lisp (file)

Use List

Previous: , Up: Packages   [Contents][Index]

4.3 anaphora

ANAPHORA provides a full complement of anaphoric macros. Subsets of the functionality provided by this package are exported from ANAPHORA-BASIC and ANAPHORA-SYMBOL.

Source

packages.lisp (file)

Use List

common-lisp

Used By List
Exported Definitions
Internal Definitions

Next: , Previous: , Up: Top   [Contents][Index]

5 Definitions

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


Next: , Previous: , Up: Definitions   [Contents][Index]

5.1 Exported definitions


Previous: , Up: Exported definitions   [Contents][Index]

5.1.1 Macros

Macro: aand FIRST &rest REST

Like AND, except binds the first argument to IT (via LET) for the scope of the rest of the arguments.

Package

anaphora

Source

anaphora.lisp (file)

Macro: acase KEYFORM &body CASES

Like CASE, except binds the result of the keyform to IT (via LET) for the scope of the cases.

Package

anaphora

Source

anaphora.lisp (file)

Macro: accase KEYFORM &body CASES

Like CCASE, except binds the result of the keyform to IT (via LET) for the scope of the cases. Unlike CCASE, the keyform/place doesn’t receive new values possibly stored with STORE-VALUE restart; the new value is received by IT.

Package

anaphora

Source

anaphora.lisp (file)

Macro: acond &body CLAUSES

Like COND, except result of each test-form is bound to IT (via LET) for the scope of the corresponding clause.

Package

anaphora

Source

anaphora.lisp (file)

Macro: actypecase KEYFORM &body CASES

Like CTYPECASE, except binds the result of the keyform to IT (via LET) for the scope of the cases. Unlike CTYPECASE, new values possible stored by the STORE-VALUE restart are not received by the keyform/place, but by IT.

Package

anaphora

Source

anaphora.lisp (file)

Macro: aecase KEYFORM &body CASES

Like ECASE, except binds the result of the keyform to IT (via LET) for the scope of the cases.

Package

anaphora

Source

anaphora.lisp (file)

Macro: aetypecase KEYFORM &body CASES

Like ETYPECASE, except binds the result of the keyform to IT (via LET) for the scope of the cases.

Package

anaphora

Source

anaphora.lisp (file)

Macro: aif TEST THEN &optional ELSE

Like IF, except binds the result of the test to IT (via LET) for the scope of the then and else expressions.

Package

anaphora

Source

anaphora.lisp (file)

Macro: alet FORM &body BODY

Binds the FORM to IT (via LET) in the scope of the BODY.

Package

anaphora

Source

anaphora.lisp (file)

Macro: aprog1 FIRST &body REST

Binds IT to the first form so that it can be used in the rest of the forms. The whole thing returns IT.

Package

anaphora

Source

anaphora.lisp (file)

Macro: asif TEST THEN &optional ELSE

Like IF, except binds the result of the test to IT (via LET) for the the scope of the then-expression, and the test form to IT (via SYMBOL-MACROLET) for the scope of the else-expression. Within scope of the else-expression, IT can be set with SETF.

Package

anaphora

Source

anaphora.lisp (file)

Macro: atypecase KEYFORM &body CASES

Like TYPECASE, except binds the result of the keyform to IT (via LET) for the scope of the cases.

Package

anaphora

Source

anaphora.lisp (file)

Macro: awhen TEST &body BODY

Like WHEN, except binds the result of the test to IT (via LET) for the scope of the body.

Package

anaphora

Source

anaphora.lisp (file)

Macro: scase KEYFORM &body CASES

Like CASE, except binds the keyform to IT (via SYMBOL-MACROLET) for the scope of the body. IT can be set with SETF.

Package

anaphora

Source

anaphora.lisp (file)

Macro: sccase KEYFORM &body CASES

Like CCASE, except binds the keyform to IT (via SYMBOL-MACROLET) for the scope of the cases. IT can be set with SETF.

Package

anaphora

Source

anaphora.lisp (file)

Macro: scond &body CLAUSES

Like COND, except each test-form is bound to IT (via SYMBOL-MACROLET) for the scope of the corresponsing clause. IT can be set with SETF.

Package

anaphora

Source

anaphora.lisp (file)

Macro: sctypecase KEYFORM &body CASES

Like CTYPECASE, except binds the keyform to IT (via SYMBOL-MACROLET) for the scope of the cases. IT can be set with SETF.

Package

anaphora

Source

anaphora.lisp (file)

Macro: secase KEYFORM &body CASES

Like ECASE, except binds the keyform to IT (via SYMBOL-MACROLET) for the scope of the cases. IT can be set with SETF.

Package

anaphora

Source

anaphora.lisp (file)

Macro: setypecase KEYFORM &body CASES

Like ETYPECASE, except binds the keyform to IT (via SYMBOL-MACROLET) for the scope of the cases. IT can be set with SETF.

Package

anaphora

Source

anaphora.lisp (file)

Macro: sif TEST THEN &optional ELSE

Like IF, except binds the test form to IT (via SYMBOL-MACROLET) for the scope of the then and else expressions. IT can be set with SETF

Package

anaphora

Source

anaphora.lisp (file)

Macro: slet FORM &body BODY

Binds the FORM to IT (via SYMBOL-MACROLET) in the scope of the BODY. IT can be set with SETF.

Package

anaphora

Source

anaphora.lisp (file)

Macro: sor FIRST &rest REST

Like OR, except binds the first argument to IT (via SYMBOL-MACROLET) for the scope of the rest of the arguments. IT can be set with SETF.

Package

anaphora

Source

anaphora.lisp (file)

Macro: stypecase KEYFORM &body CASES

Like TYPECASE, except binds the keyform to IT (via SYMBOL-MACROLET) for the scope of the cases. IT can be set with SETF.

Package

anaphora

Source

anaphora.lisp (file)

Macro: sunless TEST &body BODY

Like UNLESS, except binds the test form to IT (via SYMBOL-MACROLET) for the scope of the body. IT can be set with SETF.

Package

anaphora

Source

anaphora.lisp (file)

Macro: swhen TEST &body BODY

Like WHEN, except binds the test form to IT (via SYMBOL-MACROLET) for the scope of the body. IT can be set with SETF.

Package

anaphora

Source

anaphora.lisp (file)


Previous: , Up: Definitions   [Contents][Index]

5.2 Internal definitions


Previous: , Up: Internal definitions   [Contents][Index]

5.2.1 Macros

Macro: anaphoric OP TEST &body BODY
Package

anaphora

Source

symbolic.lisp (file)

Macro: ignore-first FIRST EXPR
Package

anaphora

Source

early.lisp (file)

Macro: internal-symbol-macrolet &rest WHATEVER
Setf Expander: (setf internal-symbol-macrolet) BINDING-FORMS PLACE
Package

anaphora

Source

symbolic.lisp (file)

Macro: symbolic OPERATION TEST &rest OTHER-ARGS
Package

anaphora

Source

symbolic.lisp (file)

Macro: with-unique-names (&rest BINDINGS) &body BODY
Package

anaphora

Source

early.lisp (file)


Previous: , Up: Top   [Contents][Index]

Appendix A Indexes


Next: , Previous: , Up: Indexes   [Contents][Index]

A.1 Concepts

Jump to:   A   F   L  
Index Entry  Section

A
anaphora.asd: The anaphora<dot>asd file
anaphora/anaphora.lisp: The anaphora/anaphora<dot>lisp file
anaphora/early.lisp: The anaphora/early<dot>lisp file
anaphora/packages.lisp: The anaphora/packages<dot>lisp file
anaphora/symbolic.lisp: The anaphora/symbolic<dot>lisp file

F
File, Lisp, anaphora.asd: The anaphora<dot>asd file
File, Lisp, anaphora/anaphora.lisp: The anaphora/anaphora<dot>lisp file
File, Lisp, anaphora/early.lisp: The anaphora/early<dot>lisp file
File, Lisp, anaphora/packages.lisp: The anaphora/packages<dot>lisp file
File, Lisp, anaphora/symbolic.lisp: The anaphora/symbolic<dot>lisp file

L
Lisp File, anaphora.asd: The anaphora<dot>asd file
Lisp File, anaphora/anaphora.lisp: The anaphora/anaphora<dot>lisp file
Lisp File, anaphora/early.lisp: The anaphora/early<dot>lisp file
Lisp File, anaphora/packages.lisp: The anaphora/packages<dot>lisp file
Lisp File, anaphora/symbolic.lisp: The anaphora/symbolic<dot>lisp file

Jump to:   A   F   L  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.2 Functions

Jump to:   (  
A   I   M   S   W  
Index Entry  Section

(
(setf internal-symbol-macrolet): Internal macros

A
aand: Exported macros
acase: Exported macros
accase: Exported macros
acond: Exported macros
actypecase: Exported macros
aecase: Exported macros
aetypecase: Exported macros
aif: Exported macros
alet: Exported macros
anaphoric: Internal macros
aprog1: Exported macros
asif: Exported macros
atypecase: Exported macros
awhen: Exported macros

I
ignore-first: Internal macros
internal-symbol-macrolet: Internal macros

M
Macro, aand: Exported macros
Macro, acase: Exported macros
Macro, accase: Exported macros
Macro, acond: Exported macros
Macro, actypecase: Exported macros
Macro, aecase: Exported macros
Macro, aetypecase: Exported macros
Macro, aif: Exported macros
Macro, alet: Exported macros
Macro, anaphoric: Internal macros
Macro, aprog1: Exported macros
Macro, asif: Exported macros
Macro, atypecase: Exported macros
Macro, awhen: Exported macros
Macro, ignore-first: Internal macros
Macro, internal-symbol-macrolet: Internal macros
Macro, scase: Exported macros
Macro, sccase: Exported macros
Macro, scond: Exported macros
Macro, sctypecase: Exported macros
Macro, secase: Exported macros
Macro, setypecase: Exported macros
Macro, sif: Exported macros
Macro, slet: Exported macros
Macro, sor: Exported macros
Macro, stypecase: Exported macros
Macro, sunless: Exported macros
Macro, swhen: Exported macros
Macro, symbolic: Internal macros
Macro, with-unique-names: Internal macros

S
scase: Exported macros
sccase: Exported macros
scond: Exported macros
sctypecase: Exported macros
secase: Exported macros
Setf Expander, (setf internal-symbol-macrolet): Internal macros
setypecase: Exported macros
sif: Exported macros
slet: Exported macros
sor: Exported macros
stypecase: Exported macros
sunless: Exported macros
swhen: Exported macros
symbolic: Internal macros

W
with-unique-names: Internal macros

Jump to:   (  
A   I   M   S   W  

Next: , Previous: , Up: Indexes   [Contents][Index]

A.3 Variables


Previous: , Up: Indexes   [Contents][Index]

A.4 Data types

Jump to:   A   P   S  
Index Entry  Section

A
anaphora: The anaphora system
anaphora: The anaphora package
anaphora-basic: The anaphora-basic package
anaphora-symbol: The anaphora-symbol package

P
Package, anaphora: The anaphora package
Package, anaphora-basic: The anaphora-basic package
Package, anaphora-symbol: The anaphora-symbol package

S
System, anaphora: The anaphora system

Jump to:   A   P   S