Hello,
Here is a hacked "psyntax.library-manager.ss":
http://proteus.freeshell.org/psyntax.library-manager.ss
It exports a 'library-resolvers' parameter.
Let's say I setup a library location at "/root/scheme-libraries" and the
layout is such that (x y z) => "x/y/z/z.scm".
I have a test library there:
~ # cat /root/scheme-libraries/abc/abc.scm
(library
(abc)
(export abc)
(import (rnrs))
(define (abc) 10))
Verify that we can't get to it:
~ # ikarus
Ikarus Scheme version 0.0.4-rc1+ (revision 1771, build 2009-05-15)
Copyright (c) 2006-2009 Abdulaziz Ghuloum
(import (abc))
Unhandled exception
Add the location to the 'library-path' parameter:
(library-path
(cons "/root/scheme-libraries" (library-path)))
Define a resolver:
(define (my-resolver lis)
(string-append
"/"
(let loop ((lis lis))
(let ((component (symbol->string (car lis))))
(cond ((null? (cdr lis))
(string-append component "/" component))
(else
(string-append component "/" (loop (cdr lis)))))))))
Register the resolver:
(library-resolvers
(cons (cons "/root/scheme-libraries" my-resolver)
(library-resolvers)))
Now try again, this time with feeling:
(import (abc))
(abc)
10
In addition to modifying "psyntax.library-manager.ss" I also had to
modify "makefile.ss" to add 'library-resolvers' to the
'identifier->library-map' table.
Ed