[comp.sys.xerox] ['provide' and 'require' and compiled files

welch@CIS.OHIO-STATE.EDU (Arun Welch) (01/31/89)

Our mailer burped on this one, sorry if you see it twice.

...arun



Date: 27 Jan 89 09:24:47 GMT
From: mcvax!enea!kth!draken!liuida!uda@uunet.uu.net  (Ulf Dahlen)
Organization: CIS Dept, Univ of Linkoping, Sweden
Subject: 'provide' and 'require' and compiled files
Message-Id: <1168@mina.liu.se>
To: info-1100@sumex-aim.stanford.edu

How is 'provide' and 'require' implemented in existing CL-implementations?
I would like 'require' to search for the compiled file first, and load it if
it's found. Xerox Lisp has a 'require' that doesn't bother about compiled
files. This makes it almost necessary to use the InterLISP function 'FILESLOAD'
and that will make programs less portable.

Let's say I have a file submodule that does the following:

(provide 'submodule)
;;; rest of file

Then say I compile this file, getting a submodule.fasl (or whatever extension
is used). If I have another file with these statements:

(provide 'mainmodule)
(require 'submodule)
;;; rest of file

I would like this file to load submodule.fasl, not submodule.lisp. The fact
that the extension for compiled files is not stated in CLtL, makes it
impossible to write (require 'submodule 'submodule.fasl) or something like
that.

__________
Ulf Dahlen
Dept of Computer & Info Science, University of Linkoping, Sweden
Troskaregatan 51:23       |     uda@ida.liu.se
S-583 30  LINKOPING       |     uda@majestix.liu.se, uda@majestix.UUCP
SWEDEN                    |     {mcvax,munnari,seismo}!enea!liuida!uda
"The beginning is a very delicate time."