[plt-scheme] Possible hygiene bug?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Fri Nov 28 09:19:00 EST 2003

At Wed, 22 Oct 2003 15:36:09 -0600, Matthew Flatt wrote:
> At Wed, 22 Oct 2003 16:09:43 -0400 (EDT), Andre van Tonder wrote:
> > (define-syntax define-test 
> >   (syntax-rules ()
> >     ((define-test x name) 
> >      (define-syntax name
> >        (syntax-rules ()
> >          ((name) (lambda (x y) (x y))))))))
> > 
> > (define-test y tester)
> > 
> > ((tester) (lambda (x) x) 1)
> > 
> > ;========================================================
> > 
> > PLT:    ==> let: duplicate binding name in: y
> > Petite: ==> 1
> 
> I agree that 1 is the correct answer, and that's what plain MzScheme
> produces.
> 
> There appears to be a bug in the debugging annotator, though (which is
> why the error message is in terms of "let" instead of "lambda"). I'll
> look into that.

The bug was actually in `expand' (which is the first step to add
debugging annotations) and in the way that MzScheme makes the result of
`expand' a syntax object that can be sent back into `expand' or `eval'.

This is fixed in v205.7.

Matthew



Posted on the users mailing list.