[plt-scheme] current-eval proc should receive syntax object, but doesn't
Hi Paulo,
It works fine for me.
DrScheme, version 369.8-svn2mar2007 [3m], Windows XP home.
(((((lambda(x)((((((((x x)x)x)x)x)x)x)x))
(lambda(x)(lambda(y)(x(x y)))))
(lambda(x)(x)x))
(lambda()(printf "Greetings, Jos~n"))))
----- Original Message -----
From: Paulo J. Matos
To: PLT-list Mailing
Sent: Saturday, March 03, 2007 3:00 PM
Subject: [plt-scheme] current-eval proc should receive syntax object,but doesn't
Hello all,
I'm working on DrScheme 369.8-svn28feb2007 (which is pretty recent). I
wonder if this is a bug, and if yes if it has been fixed already or if
it is just me doesn't what I'm not supposed to.
(module test mzscheme
(define myeval
(lambda (datum)
"buu"))
(current-eval (lambda (x) (myeval (syntax-object->datum x))))
)
I get:
syntax-object->datum: expects argument of type <syntax>; given
(current-namespace (module->namespace 'test))
Since docs say:
(current-eval [proc]) gets or sets a procedure that takes an
expression -- in the form of syntax object, S-expression, compiled
expression, or compiled expression wrapped in a syntax object -- and
returns the expression's value (or values; see section 2.2).
I guess that applying syntax-object->datum to x would always work.
--
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK
_________________________________________________
For list-related administrative tasks:
http://list.cs.brown.edu/mailman/listinfo/plt-scheme
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070303/ccdc2159/attachment.html>