Re: dynamic module creation

2009-02-03 Thread Neil Jerram
Julian Graham writes: > Incidentally, my naive attempt to refine the behavior of > `beautify-user-module!' straight-up failed: > > guile> (define m (resolve-module '(foo))) > guile> (let ((interface (make-module 31))) > ... (set-module-name! interface (module-name m)) > ... (set-module-kind! inte

Re: dynamic module creation

2009-02-02 Thread Ludovic Courtès
Hi, Andy Wingo writes: > On Sun 01 Feb 2009 08:58, Julian Graham writes: > >> Is there some way to get the module-creation >> behavior of `resolve-module' but also be able to include stuff from >> other modules in the resulting environment? > > guile> (resolve-module '(foo)) > $1 = # You could

Re: dynamic module creation

2009-02-01 Thread Julian Graham
Hi Andy, > guile> (resolve-module '(foo)) > $1 = # > guile> (beautify-user-module! $1) > $2 = (#) > guile> (module-ref $1 'sin) > $3 = # > guile> `beautify-user-module!' is great and all, but it doesn't give me any options about what to import -- it takes everything from `the-scm-module' and puts

Re: dynamic module creation

2009-02-01 Thread Neil Jerram
Andy Wingo writes: > On Sun 01 Feb 2009 08:58, Julian Graham writes: > >> Is there some way to get the module-creation >> behavior of `resolve-module' but also be able to include stuff from >> other modules in the resulting environment? > > guile> (resolve-module '(foo)) > $1 = # > guile> (beaut

Re: dynamic module creation

2009-02-01 Thread Andy Wingo
On Sun 01 Feb 2009 08:58, Julian Graham writes: > Is there some way to get the module-creation > behavior of `resolve-module' but also be able to include stuff from > other modules in the resulting environment? guile> (resolve-module '(foo)) $1 = # guile> (beautify-user-module! $1) $2 = (#) guil

dynamic module creation

2009-01-31 Thread Julian Graham
Hi Guilers, Is there a way to create a module at runtime and evaluate expressions in it using a dynamically-created set of module imports? I want to do something along the lines of: (save-module-excursion (lambda () (define-module (my-dynamic-module-name) #:use-module (a-module-i-dec