[plt-scheme] eval and interaction-enviroment in R5RS

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Nov 7 11:35:19 EST 2008

That's the next sub-section in the guide. :)

 http://docs.plt-scheme.org/guide/eval.html#(part._namespaces)


Within the `mzscheme' language (instead of `scheme/base'), assuming you
want a namespace that has `mzscheme', use `make-namespace' instead of
`make-base-namespace'.


Matthew

At Fri, 7 Nov 2008 17:25:11 +0100 (CET), Ivanyi Peter wrote:
> Hi,
> 
> I also have a similar problem, which I cannot solve by scanning
> through the document. The code below will fail in PLT-Scheme 4.x
> with:
> compile: bad syntax; reference to top-level identifier is
> not allowed, because no #%top syntax transformer is bound
> in: max
> 
> However this used to work in version < 4.0. 
> How can I transform it to version >4.0 in a least intrusive
> way? 
> (This code is only a simplified version and just changing to
> scheme 
> or scheme/base does not solve my problem because my code
> uses several features of mzscheme.) Is there an "easy" way
> to get the
> proper namespace for eval under mzscheme?
> 
> Thanks for your help.
> 
> Best regards,
> 
> Peter Ivanyi
> 
> ---------------------------------------------------------------
> 
> (module test mzscheme
>   (define (a w)
>     (display (apply (eval w)  '(1 3 7 4 2)))
>   )
>   
>   (a (quote max))
> )



Posted on the users mailing list.