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

2014-07-16 Thread Sam Tobin-Hochstadt
Ok, I thought I had figured this out, but I was wrong. Here's what I want to be able to do: - take an identifier in a fully-expanded source file - translate that identifier to some symbol in a predictable way - so that other references to that same (free-identifier=?) identifier get translated

[racket-dev] Unable to expand cross-phase persistent module

2014-07-16 Thread Sam Tobin-Hochstadt
Running `expand` on the module defined in `racket/tcp` errors. In transcript form: -> (define p (open-input-file "/home/samth/sw/plt/racket/collects/racket/tcp.rkt")) -> (define mod (read-syntax (object-name p) p)) -> (parameterize ([current-namespace (make-base-namespace)]) (expand (namespa

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

2014-07-16 Thread Matthew Flatt
Yes, it can be ".2", etc. The numbers are generated as needed to create distinct names --- deterministically for a given module compilation, assuming that all macros used by expansion are deterministic. At Wed, 16 Jul 2014 07:36:50 -0400, Sam Tobin-Hochstadt wrote: > Does that mean that I can/shou

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

2014-07-16 Thread Sam Tobin-Hochstadt
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" 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` br

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

2014-07-16 Thread Matthew Flatt
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 environment