Re: [racket-dev] question, issue(?) with the scope of identifiers passed into define-syntax-rule

2015-01-15 Thread Thomas Lynch
Yes, I see some of this at the bottom of the chapter 16 in the guide, and the recursion supported with (require (for-meta

Re: [racket-dev] question, issue(?) with the scope of identifiers passed into define-syntax-rule

2015-01-15 Thread Thomas Lynch
Thank you for that nice explanation. I'm reminded of the scope variables carried in Ruby. In Mathematica the renaming of module variables is explicit. There do not appear to be run phases there. Also thanks for the working example using syntax parse. Thus far I have working examples using defi

Re: [racket-dev] question, issue(?) with the scope of identifiers passed into define-syntax-rule

2015-01-15 Thread Alexander D. Knauth
But I think it’s important that it doesn’t use gensym or something like that, it uses syntax-marks, which means you can break these lexical scoping rules if you want/need to by using either syntax-local-introduce or datum->syntax: #lang racket (require syntax/parse/define) (define-simple-macro (

Re: [racket-dev] question, issue(?) with the scope of identifiers passed into define-syntax-rule

2015-01-15 Thread Alexander McLin
Warning I am still a Racket intermediate user but I've been studying syntactic extensions a lot the past several months. The problem here is macros in Racket have lexical scope just like procedures, they are hygienic macros. The identifiers you introduced in the with-tables macro only exist or ref