chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Compile time modules query


From: Peter Bex
Subject: Re: [Chicken-users] Compile time modules query
Date: Mon, 27 Oct 2014 08:51:57 +0100
User-agent: Mutt/1.4.2.3i

On Mon, Oct 27, 2014 at 03:02:12PM +1100, James Baker wrote:
> Hey Folks,
> 
> Have been toying around with Chicken lately and just started learning
> the module system which seems really nice to use so far.  Just have
> one question which is probably obvious but I'm not seeing how to do
> it.

Hello James,

Very cool that you're using CHICKEN!

> I've got a trivial example below which works fine from the interpreter
> but is there a way to make it work in compiled code?
> 
> ;; these work in csi but fail in csc
> (module fi = (first-functor first-module))
> (eval 'one (module-environment 'fi))

Modules do not exist after compilation.  However, you can extract
the module definitions into a module import file (via the -j or -J switch
for csc) and load that through (import foo).  This may be a little
unfortunate as it makes module-environment less useful, and you will
have to split up your files.

This is what I understand of it, but maybe someone more knowledgeable
about the module system can correct me if I'm wrong.

Cheers,
Peter
-- 
http://www.more-magic.net



reply via email to

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