[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] 5.3 Syntax Definitions

On Sat, Jun 4, 2011 at 9:52 AM, Andre van Tonder <andre@x> wrote:
> On Fri, 3 Jun 2011, Arthur A. Gleckler wrote:
>> It looks like there's a word missing here.  Perhaps add "in" after
>> "undeferred?"
>> I still find it confusing.
> Sorry, I shot that off too quickly.  Better:
>    An internal (syntax-)definition must not shadow any identifier
>    whose binding (or lack of binding) in surrounding code has already affected
>    the expansion of preceding portions of the body or of the (syntax-)definition
>    itself.

This is perhaps better than the R6RS text, but it
doesn't cover cases like the following:

(let ()
  (define (foo) 1)
  (define (bar) (foo))
  (define-syntax foo (syntax-rules () ((_) 2)))

The final syntax definition of `foo` is shadowing
a previous definition, but neither has affected
the expansion.

I think in addition to your text we should just
simply say that multiple internal definitions
of the same identifier are an error (as Ikarus


Scheme-reports mailing list