This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: load-relative trouble
- From: Per Bothner <per at bothner dot com>
- To: Rahul Lisper <rahul dot lisper at gmail dot com>
- Cc: kawa at sources dot redhat dot com, Daniel Sadilek <dsadilek at googlemail dot com>
- Date: Wed, 30 May 2007 22:02:17 -0700
- Subject: Re: load-relative trouble
- References: <16d24db60705291340p2b9b3253r521d81b164b0d29b@mail.gmail.com>
Rahul Lisper wrote:
I am using kawa 1.9.1 (jar downloaded from website). load-relative
doesnt seem to work correctly. I have filed a bug report but I just
wanted to know if there is anyway to define load-relative in scheme
itself?
You probably want to use include-relative (a macro) rather than
than load-relative. include and include-relative "load" the
specified files at compile-time rather than run-time; you almost
certainly that rather than load. load and load-relative don't
really work well with Kawa's compiler-base architecture.
Nor are they defined in R6RS, for the same reason.
load-relative has the further problem of: relative to what?
Relative to the current source file? There is no current
source file, since load is a run-time procedure. Relative
to the current working directory? load already does that.
For load-relative to be different from load, load-relative
(and possibly load) have to have a side-effect of changing
the current working directory. Having load change the
current working directory seems wrong. Having load-relative
but not load change the current working directory seems inconsistent.
A clean solution might be to have a separate "current
load path" variable, which gets set by load - and which is only
used by load-relative. I guess I can do that.
Of course the really cleanest solution is: don't use load
or load-relative.
--
--Per Bothner
per@bothner.com http://per.bothner.com/