@c -*-texinfo-*-
@c This is part of the GNU Guile Reference Manual.
-@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004
+@c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2007
@c Free Software Foundation, Inc.
@c See the file guile.texi for copying conditions.
-@page
@node SLIB
@section SLIB
@cindex SLIB
-Before the SLIB facilities can be used, the following Scheme expression
-must be executed:
+SLIB is a portable library of Scheme packages which can be used with
+Guile and other Scheme implementations. SLIB is not included in the
+Guile distribution, but can be installed separately (@pxref{SLIB
+installation}). It is available from
+@url{http://people.csail.mit.edu/jaffer/SLIB.html}.
-@smalllisp
+After SLIB is installed, the following Scheme expression must be
+executed before the SLIB facilities can be used:
+
+@lisp
(use-modules (ice-9 slib))
-@end smalllisp
+@end lisp
@findex require
+@noindent
@code{require} can then be used in the usual way (@pxref{Require,,,
slib, The SLIB Manual}). For example,
@example
(use-modules (ice-9 slib))
(require 'primes)
-(probably-prime? 13)
+(prime? 13)
@result{} #t
@end example
example the SLIB version of @code{delete-file} returns a boolean
indicating success or failure, whereas the Guile core version throws
an error for failure. In general (and as might be expected) when SLIB
-is loaded it's the SLIB specifications which are followed.
+is loaded it's the SLIB specifications that are followed.
@menu
* SLIB installation::
@node SLIB installation
@subsection SLIB installation
-The following seems to work (e.g., with slib versions 2c7 and 2d2):
+The following procedure works, e.g., with SLIB version 3a3
+(@pxref{Installation, SLIB installation,, slib, The SLIB Portable Scheme
+Library}):
@enumerate
@item
-Unpack slib somewhere, e.g., @file{/usr/local/share/slib}.
+Unpack SLIB and install it using @code{make install} from its directory.
+By default, this will install SLIB in @file{/usr/local/lib/slib/}.
+Running @code{make install-info} installs its documentation, by default
+under @file{/usr/local/info/}.
@item
-Create a symlink in the Guile site directory to slib, e.g.,:
+Define the @code{SCHEME_LIBRARY_PATH} environment variable:
+
+@example
+$ SCHEME_LIBRARY_PATH=/usr/local/lib/slib/
+$ export SCHEME_LIBRARY_PATH
+@end example
+
+Alternatively, you can create a symlink in the Guile directory to SLIB,
+e.g.:
@example
-ln -s /usr/local/share/slib /usr/local/share/guile/site/slib
+ln -s /usr/local/lib/slib /usr/local/share/guile/@value{EFFECTIVE-VERSION}/slib
@end example
@item
@example
# guile
guile> (use-modules (ice-9 slib))
-guile> (load "/usr/local/share/slib/mklibcat.scm")
+guile> (require 'new-catalog)
guile> (quit)
@end example
The catalog data should now be in
-@file{/usr/local/share/guile/site/slibcat}.
+@file{/usr/local/share/guile/@value{EFFECTIVE-VERSION}/slibcat}.
If instead you get an error such as:
or to modify @file{ice-9/slib.scm} to use @code{define-public} for the
offending variables.
-@item
-Install the documentation:
-
-@example
-cd /usr/local/share/slib
-rm /usr/local/info/slib.info*
-cp slib.info /usr/local/info
-install-info slib.info /usr/local/info/dir
-@end example
@end enumerate
@node JACAL
You can use Guile's interface to SLIB to invoke Jacal:
-@smalllisp
+@lisp
(use-modules (ice-9 slib))
(slib:load "math")
(math)
-@end smalllisp
+@end lisp
@noindent
For complete documentation on Jacal, please read the Jacal manual. If