Re: [racket-users] Racket - How to define a function that can be used both in syntax transformers and ordinary code?

2021-05-09 Thread Sage Gerard
Wow, I really butchered a sentence. Let me try it again. Old: "That is, there's a compile-time "pass" where Racket is focuses on the code you write and what they can see" New: "That is, there's a compile-time "pass" where Racket focuses on replacing used macros with new code, and that pass has

Re: [racket-users] Racket - How to define a function that can be used both in syntax transformers and ordinary code?

2021-05-09 Thread Sage Gerard
I'm stretching details a bit, but maybe it would help to think of phases as "passes." That is, there's a compile-time "pass" where Racket is focuses on the code you write and what they can see. These passes continue until the Racket program is fully expanded. Where things get tricky is

[racket-users] Racket - How to define a function that can be used both in syntax transformers and ordinary code?

2021-05-09 Thread Yushuo Xiao
I am using syntax transformers to define macros in Racket. I want to create some helper functions to help me manipulate the syntax. However, the functions I defined outside the syntax transformer are not available inside the syntax transformer. For example, in the following code (define