mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-12 06:41:13 +02:00
update tour.texi for site modules and extensions
* doc/ref/tour.texi (Putting Extensions into Modules) (Writing new Modules): In the examples, show the files as being in the "site" dirs.
This commit is contained in:
parent
d32df1325d
commit
067df233c4
1 changed files with 3 additions and 3 deletions
|
@ -235,7 +235,7 @@ in a location where Guile can automatically find it. The following
|
||||||
session shows a simple example.
|
session shows a simple example.
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
$ cat /usr/local/share/guile/foo/bar.scm
|
$ cat /usr/local/share/guile/site/foo/bar.scm
|
||||||
|
|
||||||
(define-module (foo bar)
|
(define-module (foo bar)
|
||||||
#:export (frob))
|
#:export (frob))
|
||||||
|
@ -258,14 +258,14 @@ You do this by writing a small Scheme file that defines the module and
|
||||||
call @code{load-extension} directly in the body of the module.
|
call @code{load-extension} directly in the body of the module.
|
||||||
|
|
||||||
@smallexample
|
@smallexample
|
||||||
$ cat /usr/local/share/guile/math/bessel.scm
|
$ cat /usr/local/share/guile/site/math/bessel.scm
|
||||||
|
|
||||||
(define-module (math bessel)
|
(define-module (math bessel)
|
||||||
#:export (j0))
|
#:export (j0))
|
||||||
|
|
||||||
(load-extension "libguile-bessel" "init_bessel")
|
(load-extension "libguile-bessel" "init_bessel")
|
||||||
|
|
||||||
$ file /usr/local/lib/libguile-bessel.so
|
$ file /usr/local/lib/guile/@value{EFFECTIVE-VERSION}/extensions/libguile-bessel.so
|
||||||
@dots{} ELF 32-bit LSB shared object @dots{}
|
@dots{} ELF 32-bit LSB shared object @dots{}
|
||||||
$ guile
|
$ guile
|
||||||
scheme@@(guile-user)> (use-modules (math bessel))
|
scheme@@(guile-user)> (use-modules (math bessel))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue