HCoop
/
bpt
/
guile.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
read: Support R7RS '#true' and '#false' syntax for booleans.
[bpt/guile.git]
/
doc
/
ref
/
slib.texi
diff --git
a/doc/ref/slib.texi
b/doc/ref/slib.texi
index
445b084
..
388dae1
100644
(file)
--- a/
doc/ref/slib.texi
+++ b/
doc/ref/slib.texi
@@
-1,24
+1,43
@@
-@page
+@c -*-texinfo-*-
+@c This is part of the GNU Guile Reference Manual.
+@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.
+
@node SLIB
@node SLIB
-@chapter SLIB
+@section SLIB
+@cindex SLIB
+
+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}.
-
Before the the SLIB facilities can be used, the following Schem
e
-ex
pression must be execut
ed:
+
After SLIB is installed, the following Scheme expression must b
e
+ex
ecuted before the SLIB facilities can be us
ed:
-@
small
lisp
+@lisp
(use-modules (ice-9 slib))
(use-modules (ice-9 slib))
-@end
small
lisp
+@end lisp
-@code{require} can then be used as described in
-@ref{Top, , SLIB, slib, The SLIB Manual}.
+@findex require
+@noindent
+@code{require} can then be used in the usual way (@pxref{Require,,,
+slib, The SLIB Manual}). For example,
-For example:
+@example
+(use-modules (ice-9 slib))
+(require 'primes)
+(prime? 13)
+@result{} #t
+@end example
-@smalllisp
-guile> (use-modules (ice-9 slib))
-guile> (require 'primes)
-guile> (probably-prime? 13)
-@end smalllisp
+A few Guile core functions are overridden by the SLIB setups; for
+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 that are followed.
@menu
* SLIB installation::
@menu
* SLIB installation::
@@
-26,33
+45,46
@@
guile> (probably-prime? 13)
@end menu
@node SLIB installation
@end menu
@node SLIB installation
-@section SLIB installation
+@s
ubs
ection SLIB installation
-The following seems to work, at least with slib 2c7:
+The following procedure works, e.g., with SLIB version 3a3
+(@pxref{Installation, SLIB installation,, slib, The SLIB Portable Scheme
+Library}):
@enumerate
@item
@enumerate
@item
-Unpack slib somewhere, e.g., /usr/local/lib/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
@item
-
Create a symlink in the Guile site directory to slib, e.g.,
:
+
Define the @code{SCHEME_LIBRARY_PATH} environment variable
:
@example
@example
-ln -s /usr/local/lib/slib /usr/local/share/guile/site/slib
+$ 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/lib/slib /usr/local/share/guile/@value{EFFECTIVE-VERSION}/slib
@end example
@item
@end example
@item
-Use Guile to create the catalog
ue
file, e.g.,:
+Use Guile to create the catalog file, e.g.,:
@example
# guile
guile> (use-modules (ice-9 slib))
@example
# guile
guile> (use-modules (ice-9 slib))
-guile> (
load "/usr/local/lib/slib/mklibcat.scm"
)
+guile> (
require 'new-catalog
)
guile> (quit)
@end example
guile> (quit)
@end example
-The catalog
ue
data should now be in
-@
code{/usr/local/share/guile/site
/slibcat}.
+The catalog data should now be in
+@
file{/usr/local/share/guile/@value{EFFECTIVE-VERSION}
/slibcat}.
If instead you get an error such as:
If instead you get an error such as:
@@
-61,42
+93,33
@@
Unbound variable: scheme-implementation-type
@end example
then a solution is to get a newer version of Guile,
@end example
then a solution is to get a newer version of Guile,
-or to modify
ice-9/slib.scm to use define-public
for the
+or to modify
@file{ice-9/slib.scm} to use @code{define-public}
for the
offending variables.
offending variables.
-@item
-Install the documentation:
-
-@example
-cd /usr/local/lib/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
@end enumerate
@node JACAL
-@section JACAL
+@subsection JACAL
+@cindex JACAL
@cindex Jaffer, Aubrey
@cindex symbolic math
@cindex math -- symbolic
@cindex Jaffer, Aubrey
@cindex symbolic math
@cindex math -- symbolic
-Jacal is a symbolic math package written in Scheme by Aubrey Jaffer. It
-is usually installed as an extra package in SLIB (@pxref{Packages not
-shipped with Guile}).
+Jacal is a symbolic math package written in Scheme by Aubrey Jaffer.
+It is usually installed as an extra package in SLIB.
You can use Guile's interface to SLIB to invoke Jacal:
You can use Guile's interface to SLIB to invoke Jacal:
-@
small
lisp
+@lisp
(use-modules (ice-9 slib))
(slib:load "math")
(math)
(use-modules (ice-9 slib))
(slib:load "math")
(math)
-@end
small
lisp
+@end lisp
@noindent
For complete documentation on Jacal, please read the Jacal manual. If
it has been installed on line, you can look at @ref{Top, , Jacal, jacal,
@noindent
For complete documentation on Jacal, please read the Jacal manual. If
it has been installed on line, you can look at @ref{Top, , Jacal, jacal,
-
The SLIB Manual
}. Otherwise you can find it on the web at
+
JACAL Symbolic Mathematics System
}. Otherwise you can find it on the web at
@url{http://www-swiss.ai.mit.edu/~jaffer/JACAL.html}
@url{http://www-swiss.ai.mit.edu/~jaffer/JACAL.html}