Re: [racket-users] Defining things in two phases at once

2017-07-03 Thread 'William J. Bowman' via Racket Users
You can use 'module' to define a sub module in the same file, then import the function at both phases as you would from another file. See the docs for the module form. E.g. #lang racket (module racket A (provide foo) ... ) (require (submod 'A) (for-syntax (submod 'A)) -- Sent from my

[racket-users] Defining things in two phases at once

2017-07-03 Thread Sam Waxman
Hello, I have a function, foo, that I define in a file, and then use later on in that file in multiple other functions. In some of the functions, I need foo at phase 0. In others, I need it at phase 1. Is there a way to define foo in both phases at once, or do you need to copy and paste the