[plt-scheme] Using eval in modules

From: Jean-Pierre Lozi (jean-pierre at lozi.org)
Date: Sat Jun 23 10:56:08 EDT 2007

Hi all,

How can I use eval in a module definition? For instance,

(define (abc x)
 (display "foo")

((eval (string->symbol "abc")) 1)

works, whereas

(module foo mzxcheme
 (define (abc x)
  (display "foo")

  ((eval (string->symbol "abc")) 1))

(require foo)

doesn't. Eval appears too look for the abc function in the global namespace.
Does anyone know a workaround?


Jean-Pierre Lozi
mailto:jean-pierre at lozi.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070623/c73bb1d9/attachment.html>

Posted on the users mailing list.