chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] import libraries


From: Hans Bulfone
Subject: Re: [Chicken-users] import libraries
Date: Sun, 27 Jul 2008 16:30:41 +0200
User-agent: Mutt/1.5.16 (2007-06-09)

hi,

On Sat, Jul 26, 2008 at 10:21:29PM +0200, felix winkelmann wrote:
> On Fri, Jul 25, 2008 at 5:33 PM, Hans Bulfone <address@hidden> wrote:
> > hi,
> >
> > i don't understand import libraries fully.  is it useful to generate
> > one if a module doesn't export syntax?
> 
> The import library contains the compile-time information
> and registers the module. The advantage is that this
> registration code is pointless at runtime (unless you run
> a REPL) and that it supports situation where the system
> on which you compile is different from the system on where
> your code runs (i.e. cross-compilation).

so, if one wants to make an egg that is also statically linkable, one
should still just compile the import lib to an .so (with the host
compiler) as it is only used at compile-time and is not useful as .o ?

> > doesn't that cause superfluous bindings to be imported into the
> > toplevel when the import library is loaded?
> > (especially when it's loaded manually, like described in the Modules
> > and macros manual chapter)
> 
> Yeah, that is sort of a hack. The point of it is to pull in any
> syntax-definitions
> that might be re-exported. The import-library is usually loaded via `import',
> that is, under control of the macro-expander. I'm currently not totally sure
> whether this is the right way, but as long as it works, I wouldn't worry.

so the bindings are only imported into toplevel (and normally only at
compile-time), not in another module i might be defining, which
happens to import the mpd-client module, right?

tnx&bye,
hans.




reply via email to

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