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
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users


_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to