Re: [racket-dev] Strange issue with identifier-binding being wrong for lexical variables

2014-10-22 Thread Sam Tobin-Hochstadt
On Wed, Oct 22, 2014 at 10:20 AM, Matthew Flatt wrote: > I agree that this is broken, but I'd like to put it on hold, because > its another basic problem with the way the current macro expander > represents lexical context. > > Adjusting the context of the expressions changes the result, because >

Re: [racket-dev] Strange issue with identifier-binding being wrong for lexical variables

2014-10-22 Thread Matthew Flatt
At Wed, 22 Oct 2014 10:25:51 -0400, Sam Tobin-Hochstadt wrote: > On Wed, Oct 22, 2014 at 10:20 AM, Matthew Flatt wrote: > > Expansions that produce this bad `identifier-binding` result probably > > happen up all the time. They don't bother the bytecode compiler, > > because the compiler uses `free

Re: [racket-dev] Strange issue with identifier-binding being wrong for lexical variables

2014-10-22 Thread Matthew Flatt
I agree that this is broken, but I'd like to put it on hold, because its another basic problem with the way the current macro expander represents lexical context. Adjusting the context of the expressions changes the result, because its the macro-introduced nature of the `main` definition that trig

[racket-dev] Strange issue with identifier-binding being wrong for lexical variables

2014-10-21 Thread Sam Tobin-Hochstadt
I've found what I think is a bug in the expander where lexical references can get an `identifier-binding` result that suggests that they're module-bound. In particular, you need these three files: bugtest.rkt: (module bugtest "wraptest.rkt") bugtest.scm: (define (gcbench) (define main #f)