At Wed, 11 Nov 2015 10:00:15 -0800 (PST), Thomas Dickerson wrote:
> On Tuesday, October 27, 2015 at 7:24:55 AM UTC-4, Matthew Flatt wrote:
> > This role of marks has been taken over by macro-introduction scopes, so
> > that's still the explanation. A macro-introduction scope is added to
> > the right places by first adding it everywhere to the argument to a
> > macro transformer, then flipping it everywhere in the transformer's
> > result.
> > 
> > (The documentation of `syntax-original?` includes an attempt to specify
> > that, but none of the documentation is clear enough yet about scopes.)
> 
> I'm looking at this documentation now ( 
> http://docs.racket-lang.org/reference/stxops.html#%28def._%28%28quote._~23~25ke
> rnel%29._syntax-original~3f%29%29 ) and see nothing of the sort. Can you 
> specify where this is hypothetically being communicated?

FWIW, I had in mind the "if stx’s lexical information does not indicate
that the object was introduced by a syntax transformer (see Syntax
Objects)" and the slightly more explicit variant in the development
docs.

But I completely agree that you can't get the relevant information from
that sentence or the links that it refers to, and the docs still need a
lot of work in this area.

> That the macro stepper simultaneously allows you to click on the syntax in a 
> remark or local step and see #t for original?, while simultaneously returning 
> false for syntax-original? is incredibly user hostile.

The macro stepper shows a form after expansion, while Alexis's example
was looking at it during expansion (i.e., in the dynamic extent of a
syntax transformer). Those different times have different syntax
objects --- although one is derived from the other --- and they have
different properties. In particular, the syntax object during the
transformer call has an extra scope that will be canceled when it is
returned back from the transformer.

Inspecting syntax objects during a transformer call would be useful,
but the current macro stepper doesn't do that.

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to