(rontolisp) docs
← Macros

deftype

(deftype name lambda-list body...)

A zero-parameter deftype whose body is a literal (quoted) type specifier is registered, so the defined name resolves as a type in later typep/typecase tests (a (satisfies predicate) body calls the named predicate; the name may itself expand to another type name). A parameterized or otherwise computed deftype stays a parsed no-op returning nil — there is no per-call expansion, so its name is not resolvable, which supports the common library shape where such a name only appears inside (equally no-op) declaim/declare declarations.