Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-24 Thread Matthias Felleisen
Assuming that the lookup function for type environments is isolated and in one place, it looks to me like the effort is equivalent: create one function. But since we have an expensive way of forging these identifiers, we could also argue we should get a cheap one, just in case someone else nee

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-24 Thread Matthew Flatt
Adding an operation to construct the identifier directly makes sense to me, and I can see how it might be more convenient to construct an identifier instead of changing the comparisons. At Thu, 23 May 2013 18:08:09 -0700, Eric Dobson wrote: > Right, but why cannot we forge an identifier easily? I'

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-23 Thread Eric Dobson
Right, but why cannot we forge an identifier easily? I'm happy getting an armed identifier. What are the reasons for preventing such a construction? On Thu, May 23, 2013 at 6:04 PM, Carl Eastlund wrote: > Essentially yes. It doesn't do anything else, but it needs an identifier to > do it. Curre

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-23 Thread Carl Eastlund
Essentially yes. It doesn't do anything else, but it needs an identifier to do it. Currently, TR starts with a module and a symbol, goes through an expensive process to forge an identifier from them, just to call free-identifier=? to compare based on the module and the symbol after all. Doing the

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-23 Thread Eric Dobson
Isn't that exactly what free-indentifier=? is checking for on identfiers with a module level binding? Or is there something else it does? On Thu, May 23, 2013 at 3:13 PM, Carl Eastlund wrote: > On Thu, May 23, 2013 at 4:13 PM, Ryan Culpepper wrote: >> >> On 05/23/2013 01:57 AM, Eric Dobson wrote

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-23 Thread Carl Eastlund
On Thu, May 23, 2013 at 4:13 PM, Ryan Culpepper wrote: > On 05/23/2013 01:57 AM, Eric Dobson wrote: > >> Some modules have macros which expand into identifiers that are not >> exported, as they want to protect those bindings. TR currently has the >> following code which allows it to generate an i

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-23 Thread Ryan Culpepper
On 05/23/2013 01:57 AM, Eric Dobson wrote: Some modules have macros which expand into identifiers that are not exported, as they want to protect those bindings. TR currently has the following code which allows it to generate an identifier which is free-identifier=? to what would appear in the out

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-23 Thread Robby Findler
This sounds like the right solution to me too. Robby On Thursday, May 23, 2013, Matthias Felleisen wrote: > > +1 > > > On May 23, 2013, at 9:42 AM, Carl Eastlund > > wrote: > > > > > On Thu, May 23, 2013 at 9:39 AM, Matthias Felleisen < > matth...@ccs.neu.edu > wrote: > > > > On May 23, 2013, at

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-23 Thread Matthias Felleisen
On May 23, 2013, at 9:42 AM, Sam Tobin-Hochstadt wrote: > Given that we're currently working on splitting the entire system to > make this dependency impossible, I don't think this is a viable option > currently. Perhaps that's a mistake. _ Racket Developers list:

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-23 Thread Matthias Felleisen
+1 On May 23, 2013, at 9:42 AM, Carl Eastlund wrote: > > On Thu, May 23, 2013 at 9:39 AM, Matthias Felleisen > wrote: > > On May 23, 2013, at 9:34 AM, Sam Tobin-Hochstadt wrote: > > >> 2. Is it possible that we could solve the problem via a bootstrapping-only > >> violation of our poli

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-23 Thread Sam Tobin-Hochstadt
On Thu, May 23, 2013 at 2:39 PM, Matthias Felleisen wrote: > > On May 23, 2013, at 9:34 AM, Sam Tobin-Hochstadt wrote: > >>> 2. Is it possible that we could solve the problem via a bootstrapping-only >>> violation of our policy that you can add types to Racket w/o modifying >>> existing modules

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-23 Thread Carl Eastlund
On Thu, May 23, 2013 at 9:39 AM, Matthias Felleisen wrote: > > On May 23, 2013, at 9:34 AM, Sam Tobin-Hochstadt > wrote: > > >> 2. Is it possible that we could solve the problem via a > bootstrapping-only violation of our policy that you can add types to Racket > w/o modifying existing modules? >

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-23 Thread Matthias Felleisen
On May 23, 2013, at 9:34 AM, Sam Tobin-Hochstadt wrote: >> 2. Is it possible that we could solve the problem via a bootstrapping-only >> violation of our policy that you can add types to Racket w/o modifying >> existing modules? > > No. We can't specify types inside `racket/base` without maki

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-23 Thread Sam Tobin-Hochstadt
On Thu, May 23, 2013 at 2:29 PM, Matthias Felleisen wrote: > > 1. At some point, we had a macro that opened up modules and made all > module-level identifiers available. Wouldn't a flavor of this macro work here > and, if so, wouldn't it be cheaper? Or is this what you call dumpster-diving, > t

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-23 Thread Matthias Felleisen
1. At some point, we had a macro that opened up modules and made all module-level identifiers available. Wouldn't a flavor of this macro work here and, if so, wouldn't it be cheaper? Or is this what you call dumpster-diving, traversing the expansion and extracting ids from there? 2. Is it pos

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-23 Thread Sam Tobin-Hochstadt
On Thu, May 23, 2013 at 1:54 PM, Matthias Felleisen wrote: > Can you raise the level of discourse one level and perhaps figure out whether > this is needed at all? I.e., find a different way to solve the problem? (What > is the real problem?) This is important, and it's the second implementatio

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-23 Thread J. Ian Johnson
Felleisen To: Eric Dobson Cc: dev Sent: Thu, 23 May 2013 08:54:36 -0400 (EDT) Subject: Re: [racket-dev] Constructing an identifier to an unexported binding This has a scary feeling to it. Can you raise the level of discourse one level and perhaps figure out whether this is needed at all? I.e

Re: [racket-dev] Constructing an identifier to an unexported binding

2013-05-23 Thread Matthias Felleisen
This has a scary feeling to it. Can you raise the level of discourse one level and perhaps figure out whether this is needed at all? I.e., find a different way to solve the problem? (What is the real problem?) On May 23, 2013, at 1:57 AM, Eric Dobson wrote: > Some modules have macros whi

[racket-dev] Constructing an identifier to an unexported binding

2013-05-22 Thread Eric Dobson
Some modules have macros which expand into identifiers that are not exported, as they want to protect those bindings. TR currently has the following code which allows it to generate an identifier which is free-identifier=? to what would appear in the output of the macros. define (make-template-ide