On May 9, 2015, at 11:59 AM, Matthew Flatt <[email protected]> wrote:
> At Sat, 9 May 2015 10:10:12 -0400, "Alexander D. Knauth" wrote: >> >> On May 9, 2015, at 8:59 AM, Matthew Flatt <[email protected]> wrote: >> >>> Yes, with the current expander, adding a fresh mark on the >>> reader-introduced identifiers makes them impossible to bind (except by >>> picking apart the form produced by `#λ...` to extract the special >>> identifiers). >>> >>> Although that strategy doesn't work with the set-of-scopes expander, >>> you can get the same result for both expanders by making the symbolic >>> half of the identifier fresh, instead of the lexical-context half. That >>> is, with >>> >>> (define-syntax (define-unbindable-id stx) >>> (syntax-case stx () >>> [(_ name id) >>> (with-syntax ([gen-id (string->uninterned-symbol >>> (symbol->string >>> (syntax-e #'id)))]) >>> #`(begin >>> (require (only-in racket/base [id gen-id])) >>> (define name (quote-syntax gen-id))))])) >>> >>> (define-unbindable-id afl-lambda-id lambda) >>> >>> use `afl-lambda-id` in place if `#'lambda`. >> >> Do you mean that the afl reader would add a (define-unbindable-id ….) to the >> module body? >> [...] >> Or do you mean that this would work if I put define-unbindable-id in once in >> afl/reader.rkt, or something else? > > "No" to the former, "yes" to the latter. The macro and use would be in > the reader's implementation. The reader would return the identifier > bound to `afl-lambda-id` where it currently returns a `lambda` > identifier. Thanks! -- 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/66DA5FBE-EB98-4F42-BDB7-D93E1FC57B97%40knauth.org. For more options, visit https://groups.google.com/d/optout.
