1 % Copyright (C) 2008 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 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
22 \kwd*
{REAL
} \OP{\VAR{lower-limit
}\DF{\kwd{\A}}\text{ }\Op{\VAR{upper-limit
}\DF{\kwd{\A}}}}\\
24 \kwd*
{RATIONAL
} \OP{\VAR{lower-limit
}\DF{\kwd{\A}}\text{ }\Op{\VAR{upper-limit
}\DF{\kwd{\A}}}}\\
26 \kwd*
{INTEGER
} \OP{\VAR{lower-limit
}\DF{\kwd{\A}}\text{ }\Op{\VAR{upper-limit
}\DF{\kwd{\A}}}}\\
30 \kwd*
{SIGNED-BYTE
} \Op{\VAR{size
}\DF{\kwd{\A}}}\\
31 \boxGOO{\kwd*
{UNSIGNED-BYTE
} \Op{\VAR{size
}\DF{\kwd{\A}}}
32 \boxGOO{\kwd*
{BIT
} }}}\boxGOOcr
33 \kwd*
{RATIO
}}\boxGOOcr
34 \kwd*
{FLOAT
} \OP{\VAR{lower-limit
}\DF{\kwd{\A}}\text{ }\Op{\VAR{upper-limit
}\DF{\kwd{\A}}}}\\
36 \kwd*
{SHORT-FLOAT
} \OP{\VAR{lower-limit
}\DF{\kwd{\A}}\text{ }\Op{\VAR{upper-limit
}\DF{\kwd{\A}}}}\\
37 \kwd*
{SINGLE-FLOAT
} \OP{\VAR{lower-limit
}\DF{\kwd{\A}}\text{ }\Op{\VAR{upper-limit
}\DF{\kwd{\A}}}}\\
38 \kwd*
{DOUBLE-FLOAT
} \OP{\VAR{lower-limit
}\DF{\kwd{\A}}\text{ }\Op{\VAR{upper-limit
}\DF{\kwd{\A}}}}\\
39 \kwd*
{LONG-FLOAT
} \OP{\VAR{lower-limit
}\DF{\kwd{\A}}\text{ }\Op{\VAR{upper-limit
}\DF{\kwd{\A}}}}}}\boxGOOcr
40 \kwd*
{COMPLEX
} \Op{\VAR{type
}\DF{\kwd{\A}}}}\boxGOOcr
45 \kwd*
{CONS
} \OP{\VAR{car-type
}\DF{\kwd{\A}}\text{ }\Op{\VAR{cdr-type
}\DF{\kwd{\A}}}}\\
46 \kwd*
{SYMBOL
}\footnotemark[2]
48 \kwd*
{NULL
}}}\boxGOOcr
49 \kwd*
{ARRAY
}\footnotemark[2] \OP{\VAR{type
}\DF{\kwd{\A}}\text{ }\Op{\VAR{dimension
}\DF{\kwd{\A}}}}\\
51 \kwd*
{SIMPLE-ARRAY
}\footnotemark[2] \OP{\VAR{type
}\DF{\kwd{\A}}\text{ }\Op{\VAR{dimension
}\DF{\kwd{\A}}}}\\
53 \kwd*
{VECTOR
}\footnotemark[2] \OP{\VAR{type
}\DF{\kwd{\A}}\text{ }\Op{\VAR{size
}\DF{\kwd{\A}}}}\\
55 \kwd*
{BIT-VECTOR
}\footnotemark[2] \Op{\VAR{size
}\DF{\kwd{\A}}}\\
57 \kwd*
{SIMPLE-BIT-VECTOR
} \Op{\VAR{size
}\DF{\kwd{\A}}}}\boxGOOcr
58 \kwd*
{STRING
}\footnotemark[2] \Op{\VAR{size
}\DF{\kwd{\A}}}\\
60 \kwd*
{SIMPLE-STRING
} \Op{\VAR{size
}\DF{\kwd{\A}}}\\
62 \kwd*
{BASE-STRING
}\footnotemark[2] \Op{\VAR{size
}\DF{\kwd{\A}}}\\
64 \kwd*
{SIMPLE-BASE-STRING
} \Op{\VAR{size
}\DF{\kwd{\A}}}}}}\boxGOOcr
65 \kwd*
{SIMPLE-VECTOR
} \Op{\VAR{size
}\DF{\kwd{\A}}}}}\boxGOOcr
66 \kwd*
{VECTOR
} \OP{\VAR{type
}\DF{\kwd{\A}}\text{ }\Op{\VAR{size
}\DF{\kwd{\A}}}}\\
68 \kwd*
{STRING
} \Op{\VAR{size
}\DF{\kwd{\A}}}
70 \kwd*
{BASE-STRING
} \Op{\VAR{size
}\DF{\kwd{\A}}}}\boxGOOcr
71 \kwd*
{BIT-VECTOR
} \Op{\VAR{size
}\DF{\kwd{\A}}}}}}\boxGOOcr
72 \kwd*
{ARRAY
} \OP{\VAR{type
}\DF{\kwd{\A}}\text{ }\Op{\VAR{dimension
}\DF{\kwd{\A}}}}\\
74 \kwd*
{SIMPLE-ARRAY
} \OP{\VAR{type
}\DF{\kwd{\A}}\text{ }\Op{\VAR{dimension
}\DF{\kwd{\A}}}}}\boxGOOcr
79 \kwd*
{STANDARD-CHAR
}}\boxGOOcr
80 \kwd*
{EXTENDED-CHAR
}}\boxGOOcr
84 \kwd*
{TWO-WAY-STREAM
},\>
85 \kwd*
{SYNONYM-STREAM
},\\
86 \kwd*
{STRING-STREAM
},\>
87 \kwd*
{BROADCAST-STREAM
},\>
89 \kwd*
{CONCATENATED-STREAM
}}\boxGOOcr
92 \kwd*
{LOGICAL-PATHNAME
}}\boxGOOcr
96 \kwd*
{BOOLEAN
}}\boxGOOcr
97 \kwd*
{FUNCTION
} \OP{\VAR{arg-types
}\Op{\VAR{value-types
}}}\\
99 \kwd*
{GENERIC-FUNCTION
}
100 \boxGOO{\kwd*
{STANDARD-GENERIC-FUNCTION
}}\boxGOOcr
101 \kwd*
{COMPILED-FUNCTION
}}\boxGOOcr
102 \kwd*
{STANDARD-OBJECT
}
106 \kwd*
{STANDARD-CLASS
},\>
107 \kwd*
{BUILT-IN-CLASS
},\\
108 \kwd*
{STRUCTURE-CLASS
}}\boxGOOcr
109 \kwd*
{STANDARD-METHOD
}}\boxGOOcr
112 \kwd*
{STRUCTURE-OBJECT
},\>
115 \kwd*
{RANDOM-STATE
},\>
118 \kwd*
{METHOD-COMBINATION
}}}
119 \end{center
}\vspace{-
1em
}
120 {\footnotesize\footnotemark[2]For supertypes of this
121 type look for the instance without a
\footnotemark[2].
}\\
122 {\footnotesize As a type argument,
\kwd*
{\A} means no restriction.
}
124 \caption{Data Types.
}%
130 \IT{(
\FU*
{TYPEP
} \VAR{foo
} \VAR{type
} \Op{\VAR{environment
}})
}
132 Return
\retval{\T} if
\VAR{foo
} is of
\VAR{type
}.
135 \IT{(
\FU*
{SUBTYPEP
} \VAR{type-a
} \VAR{type-b
}
136 \Op{\VAR{environment
}})
}
138 Return
\retval{\T} if
\VAR{type-a
} is a recognizable subtype of
139 \VAR{type-b
}, and
\retvalii{\NIL} if the relationship could not be
143 \IT{(
\SO*
{THE
} \NEV{\VAR{type
}} \VAR{form
})
}
145 Return
\retval{values
} of
\VAR{form
} which are declared to be of
149 \IT{(
\FU*
{COERCE
} \VAR{object
} \VAR{type
})
}
151 Coerce
\VAR{object
} into
\VAR{type
}.
154 \IT{(
\MC*
{TYPECASE
} \VAR{foo
} \OPn{(
\NEV{\VAR{type
}} \PROGN{\VAR{a-form
}})
}
155 \OP{(
\xorGOO{\kwd*
{OTHERWISE
}\\
156 \T}{\
}} \PROGN{\VAR{b-form
}\DF{\NIL}})
})
}
158 Return
\retval{values of the
\VAR{a-form
}s
} whose
\VAR{type
} is
159 \VAR{foo
} of. Return
\retval{values of
\VAR{b-form
}s
} if no
163 \IT{(
\xorGOO{\MC*
{CTYPECASE
}\\
164 \MC*
{ETYPECASE
}}{\
}} \VAR{foo
} \OPn{(
\NEV{\VAR{type
}}
165 \PROGN{\VAR{form
}\DF{\NIL}})
})
}
167 Return
\retval{values of the
\VAR{form
}s
} whose
\VAR{type
} is
168 \VAR{foo
} of. Signal correctable/non-correctable error, respectively
169 if no
\VAR{type
} matches.
172 \IT{(
\FU*
{TYPE-OF
} \VAR{foo
})
}
174 \retval{Type of
\VAR{foo
}}.
177 \IT{(
\kwd*
{CHECK-TYPE
} \VAR{place
} \VAR{type
} \Op{\VAR{string
}})
}
179 Return
\retval{\NIL} and signal correctable error if
\VAR{place
} is
183 \IT{(
\FU*
{STREAM-ELEMENT-TYPE
} \VAR{stream
})
}
185 Return
\retval{type
} of
\VAR{stream
} objects.
188 \IT{(
\FU*
{ARRAY-ELEMENT-TYPE
} \VAR{array
})
}
190 Element
\retval{type
} \VAR{array
} holds.
193 \IT{(
\FU*
{UPGRADED-ARRAY-ELEMENT-TYPE
} \VAR{type
}
194 \Op{\VAR{environment
}})
}
196 \retval{Element type
} of most specialized array capable of holding
197 elements of
\VAR{type
}.
200 \IT{(
\MC*
{DEFTYPE
} \VAR{foo
} (
\OPn{\VAR{macro-$
\lambda$
}})
%FIXME:BLOCK
201 \OPn{(
\kwd{declare
} \OPn{\NEV{\VAR{decl
}}})
} \Op{\NEV{\VAR{doc
}}}
204 Define type
\retval{\VAR{foo
}} which when referenced by (
\VAR{foo
}
205 \OPn{\NEV{\VAR{arg
}}}) applies expanded
\VAR{form
}s to
\VAR{arg
}s
206 returning the new type. For (
\OPn{\VAR{macro-$
\lambda$
}}) see
207 p.~
\pageref{section:Macros
} but with the default value of
\VAR{init
}
208 being
\kwd{\A} instead of
\NIL.
211 \IT{\arrGOO{(
\kwd{EQL
} \VAR{foo
})\\
212 (
\kwd{MEMBER
} \OPn{\VAR{foo
}})
}{.
}}
214 Specifier for a type comprising
\VAR{foo
} or
\VAR{foo
}s.
217 \IT{(
\kwd*
{SATISFIES
} \VAR{name
})
}
219 Type specifier for all objects satisfying predicate
\VAR{name
}.
222 \IT{(
\kwd*
{MOD
} \VAR{n
})
}
224 Type specifier for all integers $<n$.
227 \IT{(
\kwd{NOT
} \VAR{type
})
}
232 \IT{(
\kwd*
{AND
} \OPn{\VAR{type
}}\DF{\T})
}
234 Type specifier for intersection of
\VAR{type
}s.
237 \IT{(
\kwd*
{OR
} \OPn{\VAR{type
}}\DF{\NIL})
}
239 Type specifier for union of
\VAR{type
}s.
242 \IT{(
\kwd*
{VALUES
} \OPn{\VAR{type
}} \OP{\OPn{\VAR{type
}}
243 \Op{\VAR{other-args
}}})
}
245 Type specifier for multiple values.