On Wed, Jan 11, 2017 at 7:59 PM, Alex Knauth <alexan...@knauth.org> wrote: > >> On Jan 11, 2017, at 8:53 PM, Robby Findler <ro...@eecs.northwestern.edu> >> wrote: >> >> That might work. It might be easier to just stick in some `let`s, tho. >> I'm not sure of the best way to do it (but you'll find it once you try >> out a few), but the general approach of putting the macro system to >> work seems like the right approach. > > What do you mean by that? What do I stick `let`s around? I don't think I > could do it by overriding current-eval, because I want definitions to work in > the debug-repl. So what did you mean?
Well, when a debug repl is created, lets say that you know that the variables x, y, and z are the ones that aren't supposed to be top-level variables, but instead are supposed to be local variables. Then, you're going to do something to get input from the user (call `read-syntax` or something that calls `read-syntax`). Take that syntax object and wrap it like this: (let-syntax ([x ...][y ...][z...]) #'that-syntax-object) where the transformers for `x` `y` and `z` do whatever they need to preserve the right behavior (maybe forward set!s or maybe look in a separate table or whatever it is you want them to do). Well, anyway, I'm sure you understand the idea now. If it doesn't work because of some constraint I don't understand about how debug-repl works. Robby -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.