[Ecls-list] ECL quicklisp bug report

Matthew Mondor mm_lists at pulsar-zone.net
Mon Jan 17 20:03:00 UTC 2011


On Mon, 17 Jan 2011 12:35:17 +0100
Marko Kocić <marko.kocic at gmail.com> wrote:

> I just tried to update quicklisp, and got this error:
> 
> 
> > (ql:update-all-dists)
> 
> In function COERCE, the value of variable is
>         #\H
> which is not of expected type (INTEGER -128 127)

I've seen a similar runtime error once with some of my code, where a
DECLARE was used to specify that a variable was a FIXNUM but eventually
it was set to NIL, generating a "Cannot coerce NIL to a C int" or the
like.  In my case removing that declaration, or modifying it to use
(TYPE (OR FIXNUM NULL)) fixed it.

Perhaps that you are dealing with some code with a similar bug, where a
TYPE FIXNUM declaration was made but where a character is later
assigned to it?

Even with SBCL, a CHARACTER cannot be coerced to a FIXNUM:

* (coerce #\H 'fixnum)
debugger invoked on a SIMPLE-TYPE-ERROR: #\H can't be converted to type FIXNUM.

On ECL I however get the following error:

#\H is not of type SEQUENCE.
Which seems rather awkward...

One thing which might be good to consider in the future for ECL, would
be printing the type of condition/error issued, not only invoke its
print function.  Often I have to look at the source, or to use a custom
error handler to verify what condition it really is signalling.
The example above is such a case.

Thanks,
-- 
Matt




More information about the ecl-devel mailing list