make clean even cleaner now.
[clqr.git] / clqr-types-and-classes.tex
blob8a7239a42bc72fa4f7a7cd02915cb379a87672c4
1 % Copyright (C) 2008, 2009, 2010 Bert Burgemeister
3 % Permission is granted to copy, distribute and/or modify this
4 % document under the terms of the GNU Free Documentation License,
5 % Version 1.2 or any later version published by the Free Software
6 % Foundation; with no Invariant Sections, no Front-Cover Texts and
7 % no Back-Cover Texts. For details see file COPYING.
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11 \section{Types and Classes}
12 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
15 \begin{figure}
16 \begin{center}
17 \begin{sideways}
18 \includegraphics{clqr-types-and-classes.1}
19 \end{sideways}
20 \end{center}
21 \index{\A}
22 \index{T}%
23 \index{ATOM}%
24 \index{READTABLE}%
25 \index{PACKAGE}%
26 \index{SYMBOL}%
27 \index{KEYWORD}%
28 \index{BOOLEAN}%
29 \index{RESTART}%
30 \index{RANDOM-STATE}%
31 \index{HASH-TABLE}%
32 \index{STRUCTURE-OBJECT}%
33 \index{STANDARD-OBJECT}%
34 \index{NULL}%
35 \index{CLASS}%
36 \index{BUILT-IN-CLASS}%
37 \index{STANDARD-CLASS}%
38 \index{STRUCTURE-CLASS}%
39 \index{METHOD}%
40 \index{STANDARD-METHOD}%
41 \index{METHOD-COMBINATION}%
42 \index{CHARACTER}%
43 \index{FUNCTION}%
44 \index{COMPILED-FUNCTION}%
45 \index{GENERIC-FUNCTION}%
46 \index{STANDARD-GENERIC-FUNCTION}%
47 \index{PATHNAME}%
48 \index{LOGICAL-PATHNAME}%
49 \index{NUMBER}%
50 \index{COMPLEX}%
51 \index{REAL}%
52 \index{FLOAT}%
53 \index{SHORT-FLOAT}%
54 \index{SINGLE-FLOAT}%
55 \index{DOUBLE-FLOAT}%
56 \index{LONG-FLOAT}%
57 \index{RATIONAL}%
58 \index{INTEGER}%
59 \index{RATIO}%
60 \index{SIGNED-BYTE}%
61 \index{FIXNUM}%
62 \index{BIGNUM}%
63 \index{UNSIGNED-BYTE}%
64 \index{BIT}%
65 \index{LIST}%
66 \index{SEQUENCE}%
67 \index{CONS}%
68 \index{ARRAY}%
69 \index{SIMPLE-ARRAY}%
70 \index{VECTOR}%
71 \index{STRING}%
72 \index{SIMPLE-STRING}%
73 \index{BASE-STRING}%
74 \index{SIMPLE-BASE-STRING}%
75 \index{SIMPLE-VECTOR}%
76 \index{BIT-VECTOR}%
77 \index{SIMPLE-BIT-VECTOR}%
78 \index{STREAM}%
79 \index{FILE-STREAM}%
80 \index{TWO-WAY-STREAM}%
81 \index{SYNONYM-STREAM}%
82 \index{STRING-STREAM}%
83 \index{BROADCAST-STREAM}%
84 \index{CONCATENATED-STREAM}%
85 \index{ECHO-STREAM}%
86 \index{EXTENDED-CHAR}%
87 \index{BASE-CHAR}%
88 \index{STANDARD-CHAR}%
89 \index{CONDITION}%
90 \index{SERIOUS-CONDITION}%
91 \index{STORAGE-CONDITION}%
92 \index{SIMPLE-TYPE-ERROR}%
93 \index{TYPE-ERROR}%
94 \index{ERROR}%
95 \index{PROGRAM-ERROR}%
96 \index{CONTROL-ERROR}%
97 \index{PACKAGE-ERROR}%
98 \index{PRINT-NOT-READABLE}%
99 \index{STREAM-ERROR}%
100 \index{PARSE-ERROR}%
101 \index{CELL-ERROR}%
102 \index{FILE-ERROR}%
103 \index{ARITHMETIC-ERROR}%
104 \index{SIMPLE-CONDITION}%
105 \index{WARNING}%
106 \index{STYLE-WARNING}%
107 \index{SIMPLE-ERROR}%
108 \index{SIMPLE-WARNING}%
109 \index{UNDEFINED-FUNCTION}%
110 \index{UNBOUND-VARIABLE}%
111 \index{UNBOUND-SLOT}%
112 \index{END-OF-FILE}%
113 \index{READER-ERROR}%
114 \index{DIVISION-BY-ZERO}%
115 \index{FLOATING-POINT-INEXACT}%
116 \index{FLOATING-POINT-OVERFLOW}%
117 \index{FLOATING-POINT-UNDERFLOW}%
118 \index{FLOATING-POINT-INVALID-OPERATION}%
119 \caption{Data Types.}%
120 \end{figure}
122 For any class, there is always a corresponding type of the same name.
124 \begin{LIST}{1cm}
126 \IT{(\FU*{TYPEP} \VAR{foo} \VAR{type} \Op{\VAR{environment}\DF{\NIL}})}
128 Return \retval{\T} if \VAR{foo} is of \VAR{type}.
131 \IT{(\FU*{SUBTYPEP} \VAR{type-a} \VAR{type-b}
132 \Op{\VAR{environment}})}
134 Return \retval{\T} if \VAR{type-a} is a recognizable subtype of
135 \VAR{type-b}, and \retvalii{\NIL} if the relationship could not be
136 determined.
139 \IT{(\SO*{THE} \NEV{\VAR{type}} \VAR{form})}
141 Return \retval{values} of \VAR{form} which are declared to be of
142 \VAR{type}.
145 \IT{(\FU*{COERCE} \VAR{object} \VAR{type})}
147 Coerce \VAR{object} into \VAR{type}.
150 \IT{(\MC*{TYPECASE} \VAR{foo} \OPn{(\NEV{\VAR{type}} \PROGN{\VAR{a-form}})}
151 \OP{(\xorGOO{\kwd*{OTHERWISE}\\
152 \T}{\}} \PROGN{\VAR{b-form}\DF{\NIL}})})}
154 Return \retval{values of the \VAR{a-form}s} whose \VAR{type} is
155 \VAR{foo} of. Return \retval{values of \VAR{b-form}s} if no
156 \VAR{type} matches.
159 \IT{(\xorGOO{\MC*{CTYPECASE}\\
160 \MC*{ETYPECASE}}{\}} \VAR{foo} \OPn{(\NEV{\VAR{type}}
161 \PROGN{\VAR{form}})})}
163 Return \retval{values of the \VAR{form}s} whose \VAR{type} is
164 \VAR{foo} of. Signal correctable/non-correctable error, respectively
165 if no \VAR{type} matches.
168 \IT{(\FU*{TYPE-OF} \VAR{foo})}
170 \retval{Type of \VAR{foo}}.
173 \IT{(\kwd*{CHECK-TYPE} \VAR{place} \VAR{type} \Op{\VAR{string}})}
175 Return \retval{\NIL} and signal correctable \kwd{type-error} if \VAR{place} is
176 not of \VAR{type}.
179 \IT{(\FU*{STREAM-ELEMENT-TYPE} \VAR{stream})}
181 Return \retval{type} of \VAR{stream} objects.
184 \IT{(\FU*{ARRAY-ELEMENT-TYPE} \VAR{array})}
186 Element \retval{type} \VAR{array} can hold.
189 \IT{(\FU*{UPGRADED-ARRAY-ELEMENT-TYPE} \VAR{type}
190 \Op{\VAR{environment}\DF{\NIL}})}
192 \retval{Element type} of most specialized array capable of holding
193 elements of \VAR{type}.
196 \IT{(\MC*{DEFTYPE} \VAR{foo} (\OPn{\VAR{macro-$\lambda$}})
197 \OPn{(\kwd{declare} \OPn{\NEV{\VAR{decl}}})} \Op{\NEV{\VAR{doc}}}
198 \PROGN{\VAR{form}})}
200 Define type \retval{\VAR{foo}} which when referenced as (\VAR{foo}
201 \OPn{\NEV{\VAR{arg}}}) applies expanded \VAR{form}s to \VAR{arg}s
202 returning the new type. For (\OPn{\VAR{macro-$\lambda$}}) see
203 p.~\pageref{section:Macros} but with default value of \kwd{\A}
204 instead of \NIL. \VAR{form}s are enclosed in an implicit \SO{block} \VAR{foo}.
207 \IT{\arrGOO{(\kwd*{EQL } \VAR{foo})\\
208 (\kwd*{MEMBER } \OPn{\VAR{foo}})}{.}}
210 Specifier for a type comprising \VAR{foo} or \VAR{foo}s.
213 \IT{(\kwd*{SATISFIES} \VAR{predicate})}
215 Type specifier for all objects satisfying \VAR{predicate}.
218 \IT{(\kwd*{MOD} \VAR{n})}
220 Type specifier for all non-negative integers $<n$.
223 \IT{(\kwd*{NOT} \VAR{type})}
225 Complement of type.
228 \IT{(\kwd*{AND} \OPn{\VAR{type}}\DF{\T})}
230 Type specifier for intersection of \VAR{type}s.
233 \IT{(\kwd*{OR} \OPn{\VAR{type}}\DF{\NIL})}
235 Type specifier for union of \VAR{type}s.
238 \IT{(\kwd*{VALUES} \OPn{\VAR{type}} \OP{\OPn{\kwd{\&optional} \VAR{type}}
239 \Op{\kwd{\&rest} \VAR{other-args}}})}
241 Type specifier for multiple values.
244 \end{LIST}
248 %%% Local Variables:
249 %%% mode: latex
250 %%% TeX-master: "clqr"
251 %%% End: