chazu / ypsilon

Automatically exported from code.google.com/p/ypsilon
Other
0 stars 1 forks source link

hygiene seriously broken #107

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The program attached should NOT print oops! The let-bound lexical "begin" 
should not capture 
the "begin" in define-begin-like.  This is Ypsilon 0.9.6-trunk/r472.

Aziz,,,

(import (rnrs))

(define-syntax define-begin-like
  (syntax-rules ()
    ((_ x)
     (define-syntax x
       (syntax-rules ()
         ((_ . rest) (begin . rest)))))))

(define (p x)
  (write x) (newline) x)

(let ((begin (lambda (x y) (p "oops!"))))
  (define-begin-like my-begin)
  (my-begin (p 1) (p 2)))

Original issue reported on code.google.com by aghul...@gmail.com on 23 Jun 2009 at 6:48

GoogleCodeExporter commented 9 years ago
Thank you for your bug report!
--fujita

Original comment by y.fujita...@gmail.com on 25 Jun 2009 at 3:49