[plt-scheme] eval and namespaces question

From: John W. Small (jsmall at atlantech.net)
Date: Mon Dec 16 15:36:07 EST 2002


I'd like to define values within a module context using eval:

    (module foo mzscheme
      (eval '(define x 1)))

and require them in another module:

    (module bar mzscheme
      (require foo)
      x       ; error: expand:  unbound variable x

Since eval defines X at the top level of the current namespace it isn't
seen within the bar module.  Is there a way to require the top level in bar
or alternatively eval within the namespace of the module foo?  I'm sorry
I don't understand namespaces mechanics.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20021216/badd9270/attachment.html>

Posted on the users mailing list.