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?

Or is there any other way to define a transformer binding into a namespace?

Alex Knauth

> On Jul 13, 2016, at 8:51 PM, Alex Knauth <alexan...@knauth.org> wrote:
> 
> Would `syntax-debug-info` help here? Would the `'bindings` option have the 
> information I want?
> 
> Alex Knauth
> 
>> On Wed, Jul 13, 2016 at 6:32 PM, Alex Knauth <alexan...@knauth.org> wrote:
>>> 
>>>>>> At Wed, 13 Jul 2016 14:16:11 -0400, Alex Knauth wrote:
>>>>>>> 
>>>>>>> Thanks. So defining it as a function won't work. But if I define it as a
>>>>>>> macro, can I get more information out of it?

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