[plt-scheme] load inside a module

From: ifconfig (ifconfignslookup at hotmail.com)
Date: Sat Feb 28 14:29:16 EST 2004

If I'm not mistaken, there's a procedure called (include filename) that
compiles the file as if it were put instead of the instruction, in other
words it would compile yours as:

   (module m mzscheme
     (let ((name #f))
       (set! name "ron")
       (printf "hi ~a~%" name)))


----- Original Message ----- 
From: "Ron Stanonik" <stanonik at Cogsci.ucsd.edu>
To: <plt-scheme at list.cs.brown.edu>
Sent: Saturday, February 28, 2004 7:58 PM
Subject: [plt-scheme] load inside a module

>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> I want to keep some configuration information in a file.
> For example, config.ss might contain
>   (set! name "ron")
> Then I'd like a module to load that configuration information.
> For example
>   (module m mzscheme
>     (let ((name #f))
>       (load "config.ss")
>       (printf "hi ~a~%" name)))
> load evals outside of the module (outside of the module's namespace?),
> so name isn't set! inside of the module.  I'm guessing I need to do
> something which causes the load to eval inside of the module's namespace,
> but what?
> Thanks,
> Ron
> stanonik at cogsci.ucsd.edu

Posted on the users mailing list.