On Tue 21 Jun 2011 22:07, Ian Hulin <i...@hulin.org.uk> writes: > My question is this: > some of the .scm files in the list make references to definitions in a > .scm file loaded previously; When we compile this list of .scm files, > will we need to load each .go file produced immediately after compiling > it in order to resolve any external references, or is the byte-compiled > code smart and defers resolving external references until such time as > the .go file itself is loaded?
The main change is this: ** Functions needed by macros at expand-time need to be present at expand-time. For example, this code will work at the REPL: (define (double-helper x) (* x x)) (define-macro (double-literal x) (double-helper x)) (double-literal 2) => 4 But it will not work when a file is compiled, because the definition of `double-helper' is not present at expand-time. The solution is to wrap the definition of `double-helper' in `eval-when': (eval-when (load compile eval) (define (double-helper x) (* x x))) (define-macro (double-literal x) (double-helper x)) (double-literal 2) => 4 See the documentation for eval-when for more information. That's from the NEWS. There are some other tidbits there; I recommend reading the entire 2.0.0 NEWS entry. It's a bit long but all the info is there. Regards, Andy -- http://wingolog.org/