Re: [racket-users] Unbound identifier error with syntax transformer that uses syntax-generating helper procedure

2018-05-09 Thread Matthias Felleisen
Here is a variant of the program that asserts a phase level and breaks if it is not the expected one. This is just a programmatic confirmation of Alexis’s explanation of course. #lang racket (module syntax-assertions racket (provide assert-level) (define (assert-level i) (define ob

Re: [racket-users] Unbound identifier error with syntax transformer that uses syntax-generating helper procedure

2018-05-08 Thread Greg Rosenblatt
Thanks, that explanation helped. I had gaps in my knowledge. I also ended up daisy-chaining yet another submodule nested within the first, to require it both normally and for-template due to braid-shaped phase dependencies. Nothing seems to have gone wrong. On Tuesday, May 8, 2018 at 5:54:54

Re: [racket-users] Unbound identifier error with syntax transformer that uses syntax-generating helper procedure

2018-05-08 Thread Alexis King
The short answer is that you need a (require (for-template racket/base)) in your utilities submodule: (module utilities racket/base (provide compile-test) (require (for-template racket/base)) (define (compile-test) #`(lambda (i) (displayln `(input: ,i) But this answer pr

[racket-users] Unbound identifier error with syntax transformer that uses syntax-generating helper procedure

2018-05-08 Thread Greg Rosenblatt
Hi, I'm having trouble writing a syntax transformer that uses a syntax-generating procedure defined elsewhere. When the procedure is defined locally, everything is fine. When the procedure is defined outside the transformer, I have to do a dance to make the procedure visible at the right phase,