[r6rs-discuss] cond (and friends) must be hygienic?

From: David Van Horn <dvanhorn>
Date: Tue, 26 Jun 2007 17:47:07 -0400 (EDT)

On Tue, 26 Jun 2007, AndrevanTonder wrote:
> On Tue, 26 Jun 2007, David Van Horn wrote:
>
> > Am I correct in my reading of R5.95RS in concluding that cond may be
> > implemented as an unhygienic macro in which the above results in an
> > invalid application?
> >
> > If not, where in the document does it specify this? Does it apply to all
> > of the literals of all of the syntaxes specified in the report (eg. the _
> > and ... literals of syntax-rules)?
>
> I think so. The language in the 8th paragraph of 6.2 implies that ... and _
> refer to bindings. Since there is no concept of exporting non-bindings, I
> think 9.1 also implies that => and else must be bindings, and will therefore
> be shadowed as you showed in the => example.

Wouldn't it satisfy this specification for the base library to export a
junk binding for => and implement cond as a syntax-case macro that strips
the lexical context of => via syntax->datum and does a symbol comparison?
(I may be missing something obvious.)

David
Received on Tue Jun 26 2007 - 17:47:07 UTC

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