At Thu, 14 Jul 2016 16:01:52 -0400, Alex Knauth wrote:
> Ok, by using `syntax-debug-info` I was able to get somewhere. However, I want 
> to make the variables I'm putting into the namespace all immutable. For that 
> I 
> thought I could use `define-syntax` within `eval`, but `define-syntax` 
> appears 
> to not have any effect:
> 
> #lang racket/base
> (require (for-syntax racket/base))
> (define-namespace-anchor a)
> (define ns (namespace-anchor->namespace a))
> (eval '(define-syntax x (λ (stx) #'333)) ns)
> ;; This wasn't an error ... did it work?
> (eval 'x ns)
> ;. x: undefined;
> ; cannot reference an identifier before its definition
> ;; Nope.
> 
> What's going on? Why isn't `(eval '(define-syntax ....))` having any effect?

I've pushed a repair. It's was a bug in `namespace-anchor->namespace`,
which neglected to set a "namespace has become hopeless" bit on the
namespace that it returns.

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