[racket-dev] src-id in identifier-binding for same-module definitions
Does that mean that I can/should just drop the .1 to get the defined name?
Can it also be .2 etc?
Sam
On Jul 16, 2014 4:34 AM, "Matthew Flatt" <mflatt at cs.utah.edu> wrote:
> That `posn1.1` is a unreadable symbol that stands for the symbol
> `posn1` plus some marks that distinguish it.
>
> In other words, `posn1.1` bridges (in an ugly way) the symbol-based
> world of module environments and the identifier-based world of syntax.
> In the future, I hope to shift module environments to be
> identifier-based to avoid these unreadable symbols.
>
> At Tue, 15 Jul 2014 09:10:26 -0400, Sam Tobin-Hochstadt wrote:
> > If you take this program and fully-expand it in the macro stepper:
> >
> > #lang racket
> > (struct posn (x y))
> > (define p1 (posn 1 2))
> >
> > You see that the residual program has an application of the `posn1`
> > function, which is the hidden constructor. And indeed, the
> > fully-expanded program has a definition of `posn1`. However, if you
> > click on the use of `posn1`, the macro stepper will tell you that it's
> > defined in this module as `posn1.1`, and provided as `posn1.1` as
> > well. If you write program to grovel through the fully-expanded
> > syntax, you get these same results as the `src-id` and
> > `nominal-src-id` from `identifier-binding`.
> >
> > Why is this? And is there a way to get from `posn1.1` to `posn1`
> reliably?
> >
> > Sam
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20140716/c74e47fa/attachment.html>