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

_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to