Re: New draft (#6) and last call for comments on SRFI 266: The expr syntax
jobol 08 Sep 2026 07:36 UTC
Le Sun, 6 Sep 2026 19:55:59 -0400,
Peter McGoron <xxxxxx@mcgoron.com> a écrit :
> Closest thing is probably free-identifier=?:
>
> > Id1 and id2 must be identifiers. The free-identifier=? procedure
> returns #t if and only if the two identifiers would resolve to the
> same binding if both were to appear in the output of a transformer
> outside of any bindings inserted by the transformer. (If neither of
> two like-named identifiers resolves to a binding, i.e., both are
> unbound, they are considered to resolve to the same binding.)
>
> In R6RS, you cannot refer to a location separate from an identifier,
> but you can treat an identifier as a pointer to such a location.
R6RS spec (not lib) 9.2: "Moreover, the syntax-case form, described in
library chapter 12, allows creating transformers via arbitrary Scheme code."
In my understanding, arbitrary means that there is no restriction. So
except phasing issue, current implementation of expr is R6RS compatible.
But I can not use table programming because in order to use
free-identifier=? I have to forge an identifier for the symbols. Let
take the example of "+". '+ is the symbol "+", what I currently use for
symbol matching. + is the location bound to the symbol '+ in the
current context of evaluation. And that is all what I can get.
For using free-identifier=? I need an identifier bound to + but I don't
know how to forge it.
What is needed is one of the below resolution:
- a way to forge an identifier for the current context
- a way to test if an identifier is bound to a location
- removing "arbitrary Scheme code" from R6RS specification
I'm perhaps wrong in my conclusions. Let me know.
Anyway, I can advance on other directions but much less smart.
regards
> -- Peter McGoron
>
> On 9/6/26 17:11, jobol wrote:
> > It could be easy to achieve it based on the current implementation.
> > I just need a function that takes 2 arguments: (1) a syntax object
> > and (2) a location, and that returns true if the syntax object is an
> > identifier bound to the location in the context of the syntactic
> > expansion.
> >
> > Does such a function exist? If yes, what is its name. If no, why?
>