bugMIT/GNU Scheme - Bugs: bug #65212, syntax-rules error

 
 

bug #65212: syntax-rules error

Submitter:  None
Submitted:  Fri 26 Jan 2024 04:28:13 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect behavior
Status:  None Privacy:  Public
Assigned to:  None Originator Name:  Andrew Pochinsky
Originator Email:  -email is unavailable- Open/Closed:  Open
Keywords: 
* Mandatory Fields

Add a New Comment Rich Markup
   

Fri 26 Jan 2024 04:33:58 AM UTC, comment #1: 

Running version 12.1 on x86-64 on MacOS Ventura 13.6.3:


$ scheme
MIT/GNU Scheme running under OS X
Type `^C' (control-C) followed by `H' to obtain information about interrupts.

Copyright (C) 2022 Massachusetts Institute of Technology
This is free software; see the source for copying conditions. There is NO warranty; not even
for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Image saved on Friday January 6, 2023 at 10:11:41 PM
  Release 12.1 || SF || LIAR/x86-64

1 ]=> (load "macro-bug.scm")

;Loading "macro-bug.scm"...(outer-foo (inner 2))
;... done
;Unspecified return value

1 ]=> (load "macro-bug.scm")

;Loading "macro-bug.scm"...
;The object #[syntactic-closure 12 foo], passed as an argument to make-scode-definition, is not the correct type.
;To continue, call RESTART with an option number:
; (RESTART 1) => Return to read-eval-print level 1.

2 error> ^D
End of input stream reached.
;... aborted

Happy happy joy joy!


Anonymous
Fri 26 Jan 2024 04:28:13 AM UTC, original submission:  

The following code

(define foo 'outer-foo)
(define-syntax bar
  (syntax-rules ()
    ((_ name val) (begin
                    (define foo (list 'inner val))
                    (define name (lambda () foo))))))

(bar baz 2)
(display (list foo (baz)))
(newline)

results in error instead of printing

(outer-foo (inner 2))

as required by R7RS.

Anonymous

 

(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 None (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.

     

    No changes have been made to this item

    Back to the top

    Powered by Savane 3.13-8ccc.
    Corresponding source code