1 <?xml version='1.0' ?> <!-- -*- DocBook -*- -->
2 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
4 <!ENTITY % myents SYSTEM "entities.xml">
8 <reference id="ref_declarations">
9 <title>Declarations</title>
13 <title>Overview</title>
14 <para>Declarations are used to give the compiler optimizing
15 information about foreign types. Currently, only &cmucl;
16 supports declarations. On &acl; and &lw;, these expressions
17 declare the type generically as &t;
22 <refentry id="def-type">
24 <refname>def-type</refname>
25 <refpurpose>Defines a Common Lisp type.
27 <refclass>Macro</refclass>
32 <function>def-type</function> <replaceable>name type</replaceable>
36 <title>Arguments and Values</title>
39 <term><parameter>name</parameter></term>
41 <para>A symbol naming the type</para>
45 <term><parameter>type</parameter></term>
47 <para>A form that is evaluated that specifies the &uffi; type.
54 <title>Description</title>
55 <para>Defines a Common Lisp type based on a &uffi; type.
59 <title>Examples</title>
61 (def-type char-ptr '(* :char))
64 (declare (type char-ptr ptr))
69 <title>Side Effects</title>
70 <para>Defines a new &cl; type.</para>
73 <title>Affected by</title>
77 <title>Exceptional Situations</title>