On 08/06/2013 05:38, John Cowan wrote:I disagree. Since 'include' is exportable syntax then the expanded
> Daniel Villeneuve scripsit:
>
>> (define-syntax m
>> (syntax-rules ()
>> ((_) (lambda (a) (include "some/file.sch")))))
>>
>> where the file "some/file.sch" contains, say,
>>
>> (+ a 1)
>>
>> Is the symbol `a' in "some/file.sch" supposed to match the
>> lambda's argument?
>
> Yes, I believe so: files are included at the S-_expression_ level,
> not hygienically.
_expression_ should be like this;
(lambda (~a) (include "some/file.sch"))
Then compiler will compile it. Now, included 'a' is mere symbol so that
'include' includes mere S-_expression_. So after include should be like this;
(lambda (~a) (+ a 1))
How could compiler know these 2 symbols are the same? (I haven't checked
with current implementations, including mine, so what I'm saying might
not be the current situation, though.)
BTW, if the above macro is defined in a library, which file would be
included? The file in the same location of the library or macro caller
location?
_______________________________________________ Scheme-reports mailing list Scheme-reports@x http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports