[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
commonlisp types
Date: Tue, 6 Dec 88 21:46:27 PST
From: Jon L White <jonl@lucid.com>
re: There seems to be nothing in CLtL that answers the question:
"is x a legal type specifier?"
At the meeting that founded the X3J13 committee (on 6-Dec-85), Guy Steele
circulated a list of "non-controversial issues" and "Clarifications"
which included the following addition [typos faithfully reproduced]:
"(*) 51 Add a newefunction TYPE-SPECIFIER-P that is true of valid type
specifiers and fals of all other Lisp objects. Note that the use of
DEFSTRUCT and DEFTYPE can change the behavior of TYPE-SPECIFIER-P over
time."
Sad to say, this and many other "non-controversial" items included in
Guy's list of "Clarifications", has never been brought up in the X3J13
"Cleanup" subcommittee. However, Lucid's 3.0 release includes such
a function.
How do you define "valid type specifier"?
(deftype foo (x)
(car x))
(typep 'yow '(foo a))
==> Error taking CAR of the symbol A.
(type-specifier-p '(foo a))
==> ?
I would guess probably T, but then, how do you word the definition?
If not, how do you define it?