[racket-dev] src-id in identifier-binding for same-module definitions

From: Sam Tobin-Hochstadt (samth at cs.indiana.edu)
Date: Tue Jul 15 09:10:26 EDT 2014

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?


Posted on the dev mailing list.