chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] to "uses" or not to "uses"


From: Jörg F . Wittenberger
Subject: Re: [Chicken-users] to "uses" or not to "uses"
Date: 25 Mar 2013 10:07:15 +0100

On Mar 24 2013, Peter Bex wrote:

On Sun, Mar 24, 2013 at 11:05:49PM +0100, Jörg F. Wittenberger wrote:
For some reason, several - though not all - procedures
turn out to be undefined (e.g. resolve to an unbound value
and then segfault accordingly).


Segfaults should only happen if aggressive optimizations are
enabled.

To me this looks (at the moment) as if the uses clause enforce
the correct initialization order, while the imports just declare
what's seen by the compiler.

Sounds like you may have some phasing issues; definitions in a
module aren't seen by macros defined in the same module, unless
you define-for-syntax them.  Converting old-style Scheme into
modules is kind of tricky, since with older code you could be a
lot sloppier about which definitions are available when.  Now you
have to be precise about at which level a definition exists.

However, without some concrete examples, we can only guess why
stuff isn't working for you.

Nah, the concrete example I gave could be expanded.  Though
I hope we can get away without.

I have an tedious, but otherwise simple task to get those
syntax definitions imported.  The compiler will complain.

What's more tricky is that bindings, e.g., make-hash-table
resolve to unbond in the runtime initialization even though
there is an (import srfi-69) in the module.

I can "fix" this by giving a (uses srfi-69) before the module.
But that's precisely what I feel it's wrong.


Cheers,
Peter





reply via email to

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