slib-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Slib-discuss] Proper way to add one's own "impcat" to Slib


From: Kris De Volder
Subject: [Slib-discuss] Proper way to add one's own "impcat" to Slib
Date: Thu, 11 Dec 2008 13:30:52 -0800

I figured out how to set it up so that slib will let me generate a
catalog of feature implementations specific to my Scheme implementation.

It properly regenerates the implcat when it is generating the one for
slib itself. There is a kind of hook in mkimpcat.scm 

line 249:
  (load-if-exists (in-vicinity (implementation-vicinity) "mkimpcat")))

So I've "plugged in" to that hook by placing a mkimpcat file inside of
my implementation vicinity.

However, it appears that although the impcat gets generated OK. It is
not loaded or consulted in any way by the slib provided implementation
of require.

I've done a text search for "impcat" and "implcat" but not found any
hooks/code that actually loads the imp(l)cat.

The most relevant piece of code that I've found is the not exported
procedure catalog:get in "require.scm", but it has no code for loading
the implcat file.

It thus seems that there is no clean way for me to use the slib
require.scm implementation and have it be aware of my implcat. The only
way to make it work seems to be to edit the require.scm file, or to
redefine catalog:get after loading require.scm.

Neither of these two options is very appealing. I don't want to edit
require.scm because it could be problematic if the main slib
distribution would make alterations or bugfixes to that code.

Redefining or set!-ing to catalog:get to replace its implementation will
only work if we assume we can somehow redefine / set to "non public"
identifiers in slib modules.

Am I missing something here? Is there a better way to get slib to load
my implcat?

Kris

PS 1: it seems there are some assumptions that the file should be called
"implcat", for example in this code:

line 264 in "mklibcat.scm":
        (catcat (implementation-vicinity) "implcat" "implementation")

The naming is a little confusing: the file mkimpcat.scm actually is
supposed to generate an implcat file rather than impcat as its name
seems to suggests.

PS 2: I gather that most implementations will simply include their own
implementation of "require.scm", which makes this "problem" go away.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]