Closed divs1210 closed 3 years ago
You should get the same behavior if you run scheme --program myfile.scm
You'll have to use (top-level-value 'a)
to get the value assigned to a
, or use (define a) (display a)
Chez-exe compiles a R6RS program, which will exclusively use lexical / static scope to resolve identifiers. Since a
isn't defined until runtime it can't be located at compile time.
Thanks, that helps!
I have a script that defines top-level bindings using
define-top-level-value
.These scripts run fine when run via
scheme --script myfile.scm
but fail to compile under chez-exe with the exception:An example of such a script:
What can I do to make this work?
Thanks!