Hi,
I was poking around the source (guile-core/libguile/modules.c), and
noticed that the current toplevel module is stored in a fluid named (in
C, anyway) "the_module". Is this fluid accessible from scheme? (it does
not appear to be) Is there a good reason why it should not be made
accessible?
If it were accessible, then my load-with-env procedure would be reduced from
(define (load-with-env filename env)
(let ((real-current-module #f))
(dynamic-wind
(λ () (set! real-current-module (set-current-module env)))
(λ () (load filename))
(λ () (set-current-module real-current-module)))))
to
(define (load-with-env filename env)
(with-fluids ((the_module env))
(load filename)))
Much smaller, and simpler. I think it is cleaner, too. So we have a use
case for exposing the_module to scheme. If we don't have reasons not to
expose the_module, then I think we should.
Regards,
Jon
_______________________________________________
Guile-user mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/guile-user