scsh-users
[Top] [All Lists]

Re: load

To: Martin Gasbichler <gasbichl@informatik.uni-tuebingen.de>
Subject: Re: load
From: "Walter C. Pelissero" <walter@pelissero.org>
Date: Thu, 22 Nov 2001 13:38:56 +0000
Cc: scsh-news@zurich.ai.mit.edu
Reply-to: walter@pelissero.org
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

<Prev in Thread] Current Thread [Next in Thread>