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

2008-05-29 Thread felix winkelmann
On Wed, May 28, 2008 at 1:58 AM, Jim Ursetto <[EMAIL PROTECTED]> wrote:
>
> 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.

I have added support for checking references to unimported and undefined
identifiers (see hygienic head).


cheers,
felix


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


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

2008-05-28 Thread Jim Ursetto
On 5/28/08, felix winkelmann <[EMAIL PROTECTED]> wrote:
>> 2) Throw something like (display foobar), where foobar is unbound,
>>   into your module and at runtime it will actually display #>   value> without throwing an error.  If a procedure is unbound, it
>>   similarly complains about 'Error: call of non-procedure: #>   value>' but this is easily tracked down using the call history.
>
> How can I reproduce this? I get a proper error message.

Sorry, complete false alarm.  The offending file had
declared (no-bound-checks).  :P


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


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

2008-05-28 Thread felix winkelmann
On Wed, May 28, 2008 at 1:58 AM, Jim Ursetto <[EMAIL PROTECTED]> 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 #   value> without throwing an error.  If a procedure is unbound, it
>   similarly complains about 'Error: call of non-procedure: #   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


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users


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

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

> On Tue, May 27, 2008 at 7:02 AM, Jim Ursetto <[EMAIL PROTECTED]> wrote:
> Attached are my first stabs at working with Chicken 4.


___
Chicken-users mailing list
Chicken-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo/chicken-users