subtypep doesn't understand EQL/MEMBER/KEYWORD type
Bug #1533685 reported by
Jim Newton
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
New
|
Undecided
|
Unassigned |
Bug Description
I'd like to request an enhancement.
In SBCL (subtypep '(eql :x) 'keyword) returns NIL,NIL
but
(subtypep '(eql "x") 'string) returns T, T
and
(typep :x 'keyword) returns T
and
(subtypep '(member 1 2 3) 'fixnum) returns T, T
According to the spec subtypep IS ALLOWED to return NIL, NIL if the computation involves EQL or MEMBER,
so the behavior is not a bug.
In any case I'd like (subtypep '(eql :x) 'keyword) and (subtypep '(member :x :y :z) 'keyword) to return T, T
According to a conversation with Douglas Katzmann, this is a known issue related to a limitation of the KEYWORD type.
summary: |
- subtypep don't understand EQL/MEMBER/KEYWORD type + subtypep doesn't understand EQL/MEMBER/KEYWORD type |
To post a comment you must log in.
KEYWORD is a deftype for (and symbol (satisfies keywordp)), and subtypep can't reason well about satisfies.