bug-kawa
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-kawa] [bug #40616] Unhygienic syntax-rules


From: John Tobey
Subject: [Bug-kawa] [bug #40616] Unhygienic syntax-rules
Date: Mon, 18 Nov 2013 01:29:31 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux i686; rv:20.0) Gecko/20100101 Firefox/20.0

URL:
  <http://savannah.gnu.org/bugs/?40616>

                 Summary: Unhygienic syntax-rules
                 Project: Kawa
            Submitted by: jtobey
            Submitted on: Mon 18 Nov 2013 01:29:31 AM GMT
                Category: Scheme library
                Severity: 3 - Normal
              Item Group: Unexpected result
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

This program outputs "correct" in Racket, Guile, and RnRS [1] but "wrong" in
Kawa.


(define-syntax def-a
  (syntax-rules ()
    ((_) (define a 'wrong))))

(display (let ((a 'correct)) (def-a) a))
(newline)


[1] e.g., R6RS Section 9.2: "If a macro transformer inserts a binding for an
identifier (variable or keyword) not appearing in the macro use, the
identifier is in effect renamed throughout its scope to avoid conflicts with
other identifiers."





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?40616>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]