-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 2015-01-08 10:17, l...@gnu.org wrote:
When a program contains:
(use-modules (foo bar))
Guile searches for a file named foo/bar.scm (or foo/bar) in its search
path. The search path is defined by the user, using the
GUILE_LOAD_PATH
environment variable etc. (info "(guile) Load Paths").
So the source file of that module, foo/bar.scm, can be moved around on
the file system, as long as GUILE_LOAD_PATH is adjusted to list the
directory that contains this file.
Does that answer your question?
Ludo’.
Hi Ludo',
Sure, I am aware of that.
I am just curious about the decision to embed path info in the module
file itself.
Perhaps there is something obvious I am missing about its advantages.
It did happen before :) .
The way I see it, without too much in depth consideration, the following
would be preferable,
(my-define-module (x) ...) ;location agnostic -- the module code does
not need to know where it is
...
...
...
and then
(my-use-modules (a b c x)) ;client module is the one that has to know
about
;the location [residing in
$(SOME_USER_SITE_DIR_ADDED_TO_LOAD_PATH)/a/b/c]
Or, if you want, what is wrong with the CPP approach #include
<some/.../dir/header.h> and
no hardcoded location info in the header.h itself?
All the best.
A0
-----BEGIN PGP SIGNATURE-----
Version: OpenPGP.js v0.5.1
Comment: http://openpgpjs.org
wsBcBAEBCAAQBQJUrmYZCRC6Cm7u/wM3RwAAGiQH/A5Kh8qqaJY9x3paVgvx
7lqdfUK4stKA9pzjIdD6aCNeru9av+7l785tkkXb5hsSzE1krb3LZJ1JZM1B
RSHMVnEOcqnJF/7WsP6Kf7gwBLGEte2Ndvxd+VramzB1V97oYsLfp+jZv2M8
QQKVitKcquh8uB11PAlpe5Pnl23GF+j5GBLmPNvyE2G8aGNJu+VCsb+JYMSB
iJFxWyrfZq2rFKDYJ+1QLVqQEVR75hU0v0StVO5B4mGtfkPtsPGUIXgL4sNI
H9Ptkpn7yg/5BYeUV5mkugXi1IJ/GM7+xbc1Gyr0cPP6+IN3w2JWjRHpBjVB
Htvs59Z336CdYUOi/0tytBg=
=tUBG
-----END PGP SIGNATURE-----