> On Jan 12, 2017, at 5:33 PM, Alex Knauth <alexan...@knauth.org> wrote:
> 
> 
>> On Jan 12, 2017, at 7:43 AM, Matthew Flatt <mfl...@cs.utah.edu> wrote:
>> 
>> My thought is similar to Robby's: Does it work to add a fresh scope to
>> every identifier that you bind in the debug REPL and also add that
>> scope to everything evaluated in the REPL?
>> 
>> It seems like `splicing-let...` is more complex than you need, since
>> all the complexity in `splicing-let...` is making the body splice to
>> into a surrounding context that doesn't see the `splicing-let...`
>> bindings. Without that splicing goal, then it should be just an extra
>> scope.
> 
> Okay. Interestingly, this solution works great on 6.7 and HEAD, but not on 
> 6.6 and earlier. What changed?

I think I found what changed. It was your fix to one of my previous emails 
about debug-repl, which ended up being a problem with 
namespace-anchor->namespace and a "namespace has become hopeless" flag.

Alex Knauth

> Alex Knauth
> 
>> At Wed, 11 Jan 2017 18:41:01 -0500, Alex Knauth wrote:
>>> Hello,
>>> 
>>> I want to shadow instead of mutate. 
>>> 
>>> The ideal solution would be to create a new environment that extends the 
>>> old 
>>> one, so that new definitions in the new environment shadow the old 
>>> definitions 
>>> instead of mutating them.
>>> 
>>> But if that isn't feasible with the way namespaces work right now, is there 
>>> a 
>>> way to copy a namespace so that mutating the copy doesn't mutate the 
>>> original? 
>>> If there isn't, is there a way to functionally update a namespace to add 
>>> new 
>>> definitions?
>>> 
>>> I need this for my debug-repl package so I avoid mangling the namespace in 
>>> examples like this:
>>> 
>>>> (define x 1)
>>>> x
>>> 1 ; outside the debug-repl, x is 1
>>>> (define (f x) (debug-repl))
>>>> (f 2)
>>> -> x
>>> 2 ; inside the debug-repl, x is 2
>>> -> ; exit the debug-repl
>>>> x
>>> 2 ; x should be 1, but it mangled the namespace
>>> 
>>> Is there a way to do this without mangling the original namespace?
>>> 
>>> Alex Knauth
>>> 
>>> -- 
>>> 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.
> 
> -- 
> 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.

-- 
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.

Reply via email to