<div dir="ltr"><span style="font-size:12.8000001907349px">Hi everyone,</span><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">I am trying to figure out how to use read-syntax on a port for an entire .rkt file. I then want to call (expand ...) on this and get back a (begin ...) or (module ...) for the entire file in fully expanded form.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">If I run (expand #`(define ...)) under a #lang racket, everything works. If I place this in a file and use read-syntax however, each top-level expression is returned individually, the language declaration isn't supported, and without this information the expander complains that "define" isn't defined. How do I properly read-syntax a whole file at once?</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">Any ideas would be greatly appreciated.</div><div style="font-size:12.8000001907349px"><br></div><div style="font-size:12.8000001907349px">--</div><div style="font-size:12.8000001907349px">Tom</div></div>