bug-mit-scheme
[Top][All Lists]
Advanced

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

[bug #57793] syntax-rules nesting broken


From: Arthur A. Gleckler
Subject: [bug #57793] syntax-rules nesting broken
Date: Tue, 11 Feb 2020 14:25:42 -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

URL:
  <https://savannah.gnu.org/bugs/?57793>

                 Summary: syntax-rules nesting broken
                 Project: MIT/GNU Scheme
            Submitted by: aag
            Submitted on: Tue 11 Feb 2020 07:25:41 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
                Keywords: 

    _______________________________________________________

Details:

At 9f175968f (10.90 today), this macro and its invocation:


(define-syntax foo
  (syntax-rules ()
    ((_ (x y z))
     (letrec-syntax
         ((bar (syntax-rules (q)
                 ((_ q w)
                  '()))))
       (bar y z)))))

(foo (x1 q z1))


cause this internal error:


;The object #[syntactic-closure 122 #[syntactic-closure 123 q]], passed as an
argument to lookup-identifier, is not the correct type.


This macro isn't intended to do anything meaningful.  It's just a reproducible
test case.  It's the distillation of a more elaborate macro that started
resulting in the same error at 9f175968f, but worked before that.

Strangely, this variation:


(define-syntax foo
  (syntax-rules ()
    ((_ (x y z))
     (letrec-syntax
         ((bar (syntax-rules (q)
                 ((_ (q w))
                  '()))))
       (bar y z)))))

(foo (x1 q z1))


causes a different internal error:


;Ill-formed special form: #[uninterned-symbol 124 form]


The latter macro is buggy because there is no match in the inner macro, but
the error that is reported is unhelpful.

Thanks for all your work tracking these down.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?57793>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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