Martin Gasbichler writes:
> >>>>> "WP" == Walter C Pelissero <walter@pelissero.org> writes:
> WP> (define-structure program
> WP> (export ...)
> WP> (open scheme scsh)
> WP> (begin
>
> >> (define (foo args)
> >> ...)
>
> >> (load "source.scm")))
>
> WP> where source.scm makes use of foo.
>
> For me, the above code works fine...
I'm sorry. The example was flawed. The load should be inside a
define as in:
(define (bar)
(load "source.scm"))
> But, why do you want to use LOAD at all? Why are you not putting
> the code of source.scm in a separate module and open PROGRAM in it?
source.scm is a generated source that collects a list of configuration
statements. Anyway I'm not sure I understand what you mean.
Is it something like this you are suggesting?
In, say, modules.scm:
(define-structure source
(open program)
(files source))
and then from my, say, program.scm:
(define-structure program
(export foo ...)
(open scheme scsh source)
(begin ...))
Wouldn't this hard code source.scm in the compiled code? (yes, I'm
generating scsh images for speed)
--
walter pelissero
http://www.pelissero.org
|