Re: [Scheme-reports] Internal syntax definition order problem
Andre van Tonder 24 Apr 2011 15:18 UTC
On Sat, 23 Apr 2011, John Cowan wrote:
> Andre van Tonder scripsit:
>
>> On p 19 internal syntax definitions are required to precede internal
>> definitions.
>
> Indeed, I don't know what the justification for that sentence is; it's not
> something the WG voted on.
>
>> This make it impossible to do, e.g., the following:
>>
>> (let ()
>> (define-record-type A ....)
>> (define-record-type B ....)
>> ....)
>>
>> if define-record-type expands into both syntax and variable definitions as in
>> SRFI 9.
>
> To save the appearances, one could construe the rule as applying only to
> the text before macroexpansion, I suppose.
Yes, DEFINE-RECORD-TYPE was a bad example because it is in the standard, so
consider instead
(let ()
(define-class A .....)
(define-class B .....)
...)
where DEFINE-CLASS expands to both syntax definitions and ordinary definitions
(much like define-record-type in SRFI 9).
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports