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: Kon Lovett
Subject: Re: [Chicken-users] compiling multiple scheme files into one module?
Date: Wed, 15 Dec 2010 09:21:48 -0800


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




reply via email to

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