[plt-scheme] Can I create module on the fly?
Gregory Woodhouse skrev:
> (Actually, I'd like the module to be something I can read from a file
> port at runtime)
>
> My initial attempt was
>
> > (define md (quote
> (module m scheme/base
> (define x 11))))
> > (define ns (module->namespace ....
>
> But here I'm stuck. By itself, md or 'md isn't a legitimate module
> path, but I'd like to create a namespace for eval, so I can evaluate
> expressions in the module environment.
Just thinking out loud. How about:
1. Use write to save md to a file named "md.scm".
2. Use dynamic-require.
?
--
Jens Axel Søgaard