[Top][All Lists]

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

[bug #57785] dropped syntactic closure in 10.90

From: Arthur A. Gleckler
Subject: [bug #57785] dropped syntactic closure in 10.90
Date: Mon, 10 Feb 2020 15:29:11 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.87 Safari/537.36


                 Summary: dropped syntactic closure in 10.90
                 Project: MIT/GNU Scheme
            Submitted by: aag
            Submitted on: Mon 10 Feb 2020 08:29:09 PM UTC
                Category: runtime
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect behavior
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any



I've been trying to debug a macro that worked under 9.2.1 but fails under
10.90 (76bb84eaa).  I've narrowed the problem down to the following
reproducible test case:

(define-syntax bar
   (lambda (exp env)
     (let ((bindings (let ((sc (close-syntax (cadr exp) env)))
                       (list sc sc))))
       `(let* (,bindings)

(define-syntax bat
  (syntax-rules ()
    ((_ body ...)
     (let ((md 'quux))
       (bar md)))))

;; Under 9.2.1:

;; 1 ]=> (pp (lambda () (bat x)))
;; (lambda ()
;;   (let ((md 'quux))
;;     (let ((md md))
;;       'x)))
;; ;Unspecified return value
;; 1 ]=>

;; Under 10.90 (76bb84eaa):

;; 1 ]=> (pp (lambda () (bat x)))
;; (lambda ()
;;   (let ((.md.1-0 'quux))
;;     (let ((.md.2-1 md))
;;       'x)))
;; ;Unspecified return value
;; 1 ]=>

Note that the expansion under 10.90 means that (bat x) will fail because the
variable md will be unbound.

Is this a bug in macro expansion in 10.90, or was there a bug in 9.2.1 that
caused my macro to work there?  Or am I hopelessly confused?



Reply to this item at:


  Message sent via Savannah

reply via email to

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