[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug #65272] Attempting to define macro with keyword "if" using define-s
From: |
anonymous |
Subject: |
[bug #65272] Attempting to define macro with keyword "if" using define-syntax results in error. |
Date: |
Wed, 7 Feb 2024 19:24:01 -0500 (EST) |
URL:
<https://savannah.gnu.org/bugs/?65272>
Summary: Attempting to define macro with keyword "if" using
define-syntax results in error.
Group: MIT/GNU Scheme
Submitter: None
Submitted: Thu 08 Feb 2024 12:24:00 AM UTC
Category: None
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Incorrect behavior
Status: None
Privacy: Public
Assigned to: None
Originator Name: Richard
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Keywords:
_______________________________________________________
Follow-up Comments:
-------------------------------------------------------
Date: Thu 08 Feb 2024 12:24:00 AM UTC By: Anonymous
Discussed here:
https://stackoverflow.com/questions/77957401/why-cant-a-scheme-macro-with-the-name-if-be-defined
Incorrect behavior, running on MIT/GNU Scheme 12.1:
1 ]=> (define-syntax if
(syntax-rules ()
((_) 'ok)))
;Premature reference to reserved name: if
;To continue, call RESTART with an option number:
; (RESTART 1) => Return to read-eval-print level 1.
Correct behavior:
1 ]=> (define-syntax if
(syntax-rules ()
((_) 'ok)))
;Value: if
1 ]=> (if)
;Value: ok
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?65272>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [bug #65272] Attempting to define macro with keyword "if" using define-syntax results in error.,
anonymous <=