On Apr 16, 2015, at 8:17 AM, Matthew Flatt <[email protected]> wrote:
> I don't think a "hygienic" reader extension works in the old expander, > either. The `lambda` produced by the `afl` or `rackjure` reader doesn't > reliably refer to the `lambda` from `racket/base`, because a local > binding for `lambda` captures the reader-produced `lambda`: > > #lang rackjure > (let ([lambda 5]) > #λ(+ % 1)) ; => unbound `%1` I know, but it still works in the old expander if there is a module-level binding conflicting with it, so that’s a little bit of success, and it also works if the language doesn’t provide a lambda at all, so that’s some more success, but I was hoping that a better expansion model would be able to solve this problem for local bindings too. > There's another problem, but it's more subtle: > > #lang afl racket/kernel > #λ(+ % 1) > > This one goes wrong because there's no run-time dependency on > `racket/base`. I hadn’t thought of this one, but it makes sense, and I also think it’s reasonable to expect it to only work for a language that at least depends on racket/base, but if I remember correctly, it did work for a language that depends on racket/base but didn’t provide it. I’ll add that to the docs for afl, for now. > Meanwhile, I think readers have to produce syntax objects that have no > lexical information (i.e., no scopes). Okay, but I was hoping otherwise. Alex Knauth -- You received this message because you are subscribed to the Google Groups "Racket Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-dev/1AC75E4D-175C-4493-A88A-6B592B315ED1%40knauth.org. For more options, visit https://groups.google.com/d/optout.
