[plt-scheme] current-eval proc should receive syntax object, but doesn't

From: Paulo J. Matos (pocm at soton.ac.uk)
Date: Sat Mar 3 13:39:12 EST 2007

On 3/3/07, jos koot <jos.koot at telefonica.net> wrote:
>
>
> Hi Paulo,
> It works fine for me.
> DrScheme, version 369.8-svn2mar2007 [3m], Windows XP home.
>

Wierd...
Clean install of SVN (r5724) (original post was with r5710) gave me
the same problem:
Benvindo a DrScheme, versão 369.8-svn3mar2007 [3m].
Linguagem: (module ...).
. syntax-object->datum: expects argument of type <syntax>; given
(current-namespace (module->namespace 'test))

The only difference I can think of is definitely that you're on Window
XP and I'm on Linux. Do you know your current SVN release? I get the
same error with the stable 360.

With
(module test mzscheme

 (define myeval
   (lambda (datum)
     datum))

 (current-eval (lambda (x) (myeval x)))

 )

I get upon running in module language the s-expr: (current-namespace
(module->namespace 'test))

i.e. if I have (list? datum) inside myeval, I get #t.

Any guesses?

Cheers,

Paulo Matos

> (((((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
>


-- 
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK


Posted on the users mailing list.