next up previous contents
Next: 8.2.3 Alien Type Specifiers Up: 8.2 Alien Types Previous: 8.2.1 Defining Alien Types

8.2.2 Alien Types and Lisp Types

The Alien types form a subsystem of the CMU Common Lisp type system. An alien type specifier provides a way to use any Alien type as a Lisp type specifier. For example

(typep foo '(alien (* int)))
can be used to determine whether foo is a pointer to an int. alien type specifiers can be used in the same ways as ordinary type specifiers (like string.) Alien type declarations are subject to the same precise type checking as any other declaration (section See section 4.5.2.)

Note that the Alien type system overlaps with normal Lisp type specifiers in some cases. For example, the type specifier (alien single-float) is identical to single-float, since Alien floats are automatically converted to Lisp floats. When type-of is called on an Alien value that is not automatically converted to a Lisp value, then it will return an alien type specifier.



Raymond Toy
Mon Jul 14 09:11:27 EDT 1997