Re: [Scheme-reports] 5.3 Syntax Definitions Andre van Tonder (04 Jun 2011 00:52 UTC)
Re: [Scheme-reports] 5.3 Syntax Definitions Alex Shinn (04 Jun 2011 07:02 UTC)
Re: [Scheme-reports] 5.3 Syntax Definitions Andre van Tonder (04 Jun 2011 14:08 UTC)
Re: [Scheme-reports] 5.3 Syntax Definitions Alex Shinn (05 Jun 2011 09:41 UTC)
Re: [Scheme-reports] 5.3 Syntax Definitions John Cowan (05 Jun 2011 20:19 UTC)

Re: [Scheme-reports] 5.3 Syntax Definitions Alex Shinn 04 Jun 2011 07:02 UTC

On Sat, Jun 4, 2011 at 9:52 AM, Andre van Tonder <andre@het.brown.edu> 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)))
  (bar))

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
says).

--
Alex