Stream to be bound to the fasl file to be created.
Name of the fasl file to be created.
Forms, some of which may be dumped.
with-output-to-fasl-file
is used in conjunction with dump-form. The
body
forms are executed, and during the execution, dump-form may be called to dump selected forms. Dumped forms are evaluated if the file
pathname
is later loaded by load-data-file.
To be able to load the output file, it must have a file type that LispWorks recognizes as a binary file. You can do it by:
compile-file-pathname
.If the file pathname already exists, it is superseded.
A fasl file created using
with-output-to-fasl-file
must be loaded only by load-data-file, and not by
load
.
CL-USER 12 > (with-output-to-fasl-file (s "/tmp/foo.fasl")
(dump-form '(print 'hello) s))
NIL
CL-USER 13 > (let ((sys:*binary-file-type* "fasl"))
(sys:load-data-file "/tmp/foo.fasl"))
; Loading fasl file "/tmp/foo.fasl"
HELLO
#P"/tmp/foo.fasl"
LispWorks User Guide and Reference Manual - 21 Dec 2011