chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] compiling multiple scheme files into one module?


From: Alan Post
Subject: Re: [Chicken-users] compiling multiple scheme files into one module?
Date: Wed, 15 Dec 2010 11:20:40 -0700

Thank you for the reexport line.  This doesn't solve my problem
exactly how I wanted to, but it solves my problem nevertheless.

Having the extra module around isn't the end of the world, as
it will itself be useable without module B here.

-Alan

On Wed, Dec 15, 2010 at 09:21:48AM -0800, Kon Lovett wrote:
> 
> On Dec 15, 2010, at 8:34 AM, Alan Post wrote:
> 
> >I would like to compile two separate scheme files, with different
> >(declare ...) options, into a single module.
> >
> >Is it possible to do this?  How do I format the (module ...) code
> >and arrange for separate compilation of the two .scm files?
> 
> I think it must be two modules. The `(declare ...)' form is file-wide  
> and only a single '`(module ..)' per file is possible. So you could  
> have:
> 
>       (declare ... set -A ...)
>       (module A ...)
> 
> and
>        (declare ... set-B ...)
>       (module B  ...
>               (import ... A ....)
>               (reexport A)
>               ... )
> 
> So you have 2 compilation-units their own declarations. This does mean  
> that module A can be imported w/o module B but that may not be a  
> problem.
> 
> (Note that the actual placement of `(declare ...)' in the compile-unit  
> is not important.)
> 
> Hope that helps,
> Kon
> 
> >
> >-Alan
> >-- 
> >.i ko djuno fi le do sevzi
> >
> >_______________________________________________
> >Chicken-users mailing list
> >address@hidden
> >http://lists.nongnu.org/mailman/listinfo/chicken-users
> 

-- 
.i ko djuno fi le do sevzi



reply via email to

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