> There is another way: syntax-local-introduce will remove the macro scope.
`syntax-local-introduce` is no longer useful for this purpose since the
switch to the scope sets model. Other scopes, such as module scopes, will
often distinguish the macro-introduced name. For example, using
On Sunday, June 7, 2020 at 4:45:34 PM UTC-6, Sorawee Porncharoenwase wrote:
> Wow, so block is currently buggy?!
> On Sun, Jun 7, 2020 at 3:31 PM Michael Ballantyne > wrote:
>> Hah! You're right. The arrow points to the inner definition. But
perfectly shows why I need
> internal-definition-context-track, however. Thank you very much.
> On Sun, Jun 7, 2020 at 7:51 AM Michael Ballantyne > wrote:
>> > I am unable to come up with a program where this difference is
>> significant though
ext-track? Normally, internal definitions are
> expanded into letrec-syntaxes+values, so the bindings don’t actually
> disappear. So I am curious why internal-definition-context-track is
> Thanks again.
> On Sat, Jun 6, 2020 at 8:21 AM Michael Ballantyne > wrote:
Explicitly expanding `e` would ensure that the expansion work only has to
happen once, rather than twice. Even so, the fully-expanded syntax will be
expanded again in `syntax-local-bind-syntaxes` and in the expansion.
As far as I've seen, the only thing that liberal define contexts control is
Two identifiers that are both unbound and have the same symbol are
considered free-identifier=?. Thus the match works when testing from
expander-utils.rkt, where both the pattern and usage are unbound. It also
works from expander-utils.rkt when you define `line` in that file, because
> In the docs, I however did read about `syntax-binding-set` and
> `syntax-binding-set-extend`, that apparently allow manually setting the
> bindings of a symbol. Would that be a potential solution?
> Le samedi 28 septembre 2019 16:05:57 UTC+2, Michael Bal
Yeah, the `begin` shouldn't be a problem---`define`s splice out of a begin.
And it doesn't look like you're missing the binding pass, because you are
successfully expanding to module-level `define-values` forms.
I suspect that your problem relates to the set of scopes that end up on the
Here's another implementation you might consider. In this version you can
view the body of `phone-numbers` as a language consisting of the `number`
and `number-list` syntactic forms. The language also supports its own kind
of macros---phone number macros---that can expand to forms of the
It's not an answer to your broader question, but I suspect what you
actually want here is
;; inside syntax-parse
(datum->syntax this-syntax '<~)
Notice that the second argument to datum->syntax should be a symbol here,
rather than a syntax object. If you
I'm delighted to offer both. Here's a particularly pathological test case:
Using a typed/racket/no-check variant of the tr-pfds package makes my
untyped code run 1275x faster. The feature-profile tool reports that
in the TR variant
Mail list logo