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
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
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
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,
4 matches
Mail list logo