bugMIT/GNU Scheme - Bugs: bug #57833, letrec-syntax is broken

 
 

bug #57833: letrec-syntax is broken

Submitter:  Arthur A. Gleckler <aag>
Submitted:  Sun 16 Feb 2020 07:14:57 PM UTC
   
 
Category:  runtime Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect behavior
Status:  Fixed Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Closed
Keywords: 
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 30 Mar 2020 06:41:17 AM UTC, comment #1: 

Thank you!  This fixed not only the test case I submitted, but also my more complex macros that were failing at the time.

Arthur A. Gleckler <aag>
Group Member
Sun 16 Feb 2020 07:14:57 PM UTC, original submission:  

letrec-syntax is now broken:


1 ]=> (define-syntax foo
  (syntax-rules ()
    ((_ xy)
     (letrec-syntax
         ((bar1 (syntax-rules ()
                  ((_ (else* destination))
                   (destination))))
          (bar2 (syntax-rules ()
                  ((_ z)
                   (bar1 z)))))
       (bar2 xy)))))

;Value: foo

1 ]=> (pp (lambda () (foo (else* start))))
(lambda ()
  (bar1 (else* start)))
;Unspecified return value

1 ]=>


Under 9.2.1 the answer was:


(lambda ()
  (start))


Splitting the define-syntax form into three separate definitions solves this specific problem, but there seem to be other problems, too, with unbound references.  I haven't yet managed to distill that into a reproducible test case, though.  I hope it's just another manifestion of the same bug.

This is the bug that appeared after #57793 was fixed.

Arthur A. Gleckler <aag>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by cph (Updated the item)
  • -email is unavailable- added by aag (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2020-03-30 cph StatusNone Fixed
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code