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

From: jos koot (jos.koot at telefonica.net)
Date: Sun Mar 4 06:08:39 EST 2007

----- Original Message ----- 
From: jos koot 
To: Paulo J. Matos 
Sent: Sunday, March 04, 2007 11:56 AM
Subject: Re: [plt-scheme] current-eval proc should receive syntax object,but doesn't


Hi Paolo
You're right about the problem appearing with language module. It does not occur when using language MzScheme. Even more weird is that even with language Module, pressing the run button followed by requiring the module in the interaction window does produce the desired results. I did this with DrScheme, version 369.8-svn2mar2007 [3m].
Jos koot

(((((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: jos koot 
  Cc: PLT-list Mailing 
  Sent: Saturday, March 03, 2007 7:39 PM
  Subject: Re: [plt-scheme] current-eval proc should receive syntax object,but doesn't


  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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070304/ee3d6698/attachment.html>

Posted on the users mailing list.