Next Previous Up Top Contents Index

10 The HCL Package

dump-forms-to-file

Function

Summary

Dumps specified forms to a fasl file.
Package

hcl

Signature

dump-forms-to-file pathname forms => nil

Arguments

pathname

Name of the fasl file to be created.

forms

Forms to be dumped.

Values

Returnsnil.
Description

dump-forms-to-file dumps specified forms to a fasl file. Use the Common Lisp functionsmake-load-form andmake-load-form-saving-slots to control the dumping of forms.
LispWorks uses the following naming conventions for fasl files, and it is recommended that you should use them too, to ensure correct operation ofload and so on.

Table 10.1 Naming conventions for fasl files

Machine Architecture

Fasl File Extension

68000

.fasl

DECstation

.dfasl

SPARC

.wfasl

MIPS

.mfasl

Clipper

.cfasl

386 UNIX

.3fasl

386 Windows

.fsl

You can find the fasl file extension appropriate for your machine by looking at the variablesystem:*binary-file-type*. The variablesystem::*binary-file-types* contains a list of all the file extensions currently recognized byload.
For an example, see below.
USER 1 > (in-package "CL-USER")
#<The CL-USER package, 592/879 internal, 148/224 external>
CL-USER 2 > (defclass my-class () ((a :initarg :a :accessor my-a)))
#<class MY-CLASS>
CL-USER 3 > (setq my-instance (make-instance 'my-class :a 23))
#<standard-instance MY-CLASS>
CL-USER 4 > (defmethod make-load-form ((self my-class))
 '(make-instance ',(class-name (class-of self))
               :a ',(my-a self)))
#<Method MAKE-LOAD-FORM NIL (MY-CLASS)>
CL-USER 5 > (hcl:dump-forms-to-file 
    #p"/usr/users/ca/eg.wfasl"
    '(my-instance))
NIL

See also

with-output-to-fasl-file


LispWorks Reference Manual - 15 Oct 1998

Next Previous Up Top Contents Index

Generated with Harlequin WebMaker