[r6rs-discuss] [Formal] syntax-rules should evaluate to a transformer

From: David Van Horn <dvanhorn>
Date: Tue Nov 14 18:54:06 2006

---
This message is a formal comment which was submitted to formal-comment_at_r6rs.org, following the requirements described at: http://www.r6rs.org/process.html
---
Name: David Van Horn
Email: dvanhorn_at_cs.brandeis.edu
Type: Enhancement & Simplification
Priority: Major
R6RS component: Macros
Version of the report: 5.91
Summary of the issue
--------------------
A syntax-rules form should evaluate to a transformer procedure at 
expansion time.
Full description
----------------
For simplicity and consistency, syntax-rules should evaluate to a 
transformer.  This simplifies Section 9.3, Syntax definitions, by making 
the right hand side of define-syntax to be a transformer, rather than a 
transformer or a syntax-rules form.  Likewise, Section 9.20, Binding 
constructs for syntactic keywords, should simplify transformer spec to 
transformer.  Current language such as "the specified transformers" 
already blurs the distinction and the obvious implementation of 
syntax-rules in terms of syntax-case provides this property.
This also enhances Section 17.3, Transformers, where it is said that a 
binding for a syntactic keyword must be a transformer spec, and a 
transformer spec must be an expression that evaluates to a transformer 
(overriding the previous definition of a transformer spec).  This 
implicitly prohibits syntax-rules from being used in (r6rs syntax-case) 
macros.  Making syntax-rules evaluate to a transformer eliminates this 
restriction.  It also enhances this section by allowing syntax-rules 
forms as inputs to make-variable-transformer.
Received on Tue Nov 14 2006 - 13:19:41 UTC

This archive was generated by hypermail 2.3.0 : Wed Oct 23 2024 - 09:15:00 UTC