chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] my first chicken 4 modules ;)


From: felix winkelmann
Subject: Re: [Chicken-users] my first chicken 4 modules ;)
Date: Wed, 28 May 2008 09:02:56 +0200

On Wed, May 28, 2008 at 1:58 AM, Jim Ursetto <address@hidden> wrote:
> I also managed to port vector-lib.egg over.
>
> Minor issues encountered during the port:
>
> 1) Warnings aren't issued for unbound identifiers -- I spent a while
>   tracking down a weird error and it turns out I forgot to import
>   'when' from chicken, along with numerous runtime failures when I
>   forgot to import procedures.  Some of that is inexperience.  But
>   the analogue of -check-imports would be nice.  I guess once this is
>   more mature then consistent import library data would be usable for
>   this role.

It should indeed be possible to warn in this case. I'll think of something.

> 2) Throw something like (display foobar), where foobar is unbound,
>   into your module and at runtime it will actually display #<unbound
>   value> without throwing an error.  If a procedure is unbound, it
>   similarly complains about 'Error: call of non-procedure: #<unbound
>   value>' but this is easily tracked down using the call history.

How can I reproduce this? I get a proper error message.

> 3) Importing and then redefining an R5RS binding, such as
>   list->vector, inside a module results in 'Warning: exported
>   variable multiply defined' and also overwrites the toplevel binding
>   as soon as you link in the extension with (use).  To avoid this
>    I did the following:
>
> (import (except scheme list->vector vector->list vector-fill!)
>        (prefix (only scheme list->vector vector->list vector-fill!)
>                %))
>
>   and then used %list->vector as the core version.  This worked
>   fine.  But I'm not sure if it's correct.
>

I'm not sure how to handle this. Importing bindings does not
introduce module-local bindings on redefinition, as it does
in many other module systems. I have added a note to
the manual about this.


cheers,
felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]