|
From: William H. N. <wil...@ai...> - 2002-01-21 19:51:55
|
Back in October (predating the death of my old laptop mail machine,
so this isn't a proper reply-to-ish reply to the original message)
Christophe Rhodes sent "a rough patch to fix bug 106".
I'm going to reject it because it seems to be wrong in some details.
In particular, after the patch we have
* (sb-kernel:specifier-type '(complex (member 6 9)))
#<SB-KERNEL:NUMERIC-TYPE (COMPLEX RATIONAL)>
so that
* (typep (complex 1/2 3/2) '(complex (member 6 9)))
T
That seems worse than the old behavior, where the pre-ANSI code
refused to accept (COMPLEX (MEMBER ...)) types at all. I'd rather have
code that signals an error about its nonconformance than code which
quietly gets the wrong answer.
I doubt I'll try to fix it myself in the near future, but I'd be happy
to consider another patch for the same problem.
There were various caveats in the original message, and I didn't
particularly troubled by them. They're not enough to stop me from
merging an ANSI-compliance fix, or even a partial ANSI-compliance
fix.
Speaking of partial ANSI compliance, a partial fix would be OK, too.
In fact, my original analysis of the code was that it was only a
partial fix, because it didn't seem to cover monstrosities like
(COMPLEX (OR (AND INTEGER (SATISFIES ODDP))
(AND FLOAT (SATISFIES FOO))))
and I still liked it at that point, since it covered lots of stuff
that the old code didn't. If the remaining uncovered cases had been
the only problem, I'd've merged the patch with only a slight
modification, making the no-more-cases-I-can-handle case at the end
do something like
(multiple-value-bind (subtypep certainly)
(csubtypep typespec (specifier-type 'real))
(if (and (not subtypep) certainly)
(not-real)
(error "~@<internal error (bug 145): The type ~S ~
is too hairy to be used for a COMPLEX component.~:@>"
typespec)))
and adding a new BUGS entry 145 about the lack of coverage of
especially hairy cases like this.
--
William Harold Newman <wil...@ai...>
"Look on my works, ye Mighty, and despair!" -- Ozymandias, King of Kings
PGP key fingerprint 85 CE 1C BA 79 8D 51 8C B9 25 FB EE E0 C3 E5 7C
pending patches:
APD "bug 111" sbcl-devel 2001-12-30
|