-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01/17/2012 09:35 AM, [email protected] wrote: > I have two files which are run correctly by the interpreter but the > compiled version fails to run: > > $ csi -i -s x.scm > x > y > > $ csc x.scm && ./x > x > > Error: unbound variable: y > > Is this the intended behavior?
Yes. The effect of load is, necessarily, at run time. When run in csi, the load can therefore happen immediately, and csi gets the syntax definition of y. When compiled, the load happens not at compile time but at run time, when it's too late to expand any syntax; the compiler has compiled in a reference to y as a (initially unbound) variable in the hope that loading y.scm will assign a value to y. However, syntax definitions are not value assignments, as they are compile-time beasts! ABS - -- Alaric Snell-Pym http://www.snell-pym.org.uk/alaric/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk8VUYMACgkQRgz/WHNxCGosyACcCY5CpL+aUap/omyXLL9aR0yb yLYAn1xr6cgmt05/9zW5/vkYBfgx3dgX =gvpQ -----END PGP SIGNATURE----- _______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
