Next: , Previous: , Up: Compiling   [Contents][Index]

6.5.2 Compiling to an archive file

Procedure: compile-file source-file compiled-archive

Compile the source-file, producing a .zip archive compiled-file.

For example, to byte-compile a file ‘foo.scm’ do:

(compile-file "foo.scm" "foo")

This will create ‘’, which contains byte-compiled JVM .class files. You can move this file around, without worrying about class paths. To load the compiled file, you can later load the named file, as in either (load "foo") or (load ""). This should have the same effect as loading ‘foo.scm’, except you will get the faster byte-compiled versions.