On Mon, 17 Jan 2011 12:35:17 +0100
Marko Kocić <marko.ko...@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

------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to