1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-28 16:00:22 +02:00

update tour.texi

* doc/ref/tour.texi (Using the Guile Module System): Remove "in flux"
  language. Update examples to use #:export instead of (export ...).
This commit is contained in:
Andy Wingo 2010-10-01 11:54:38 +02:00
parent 1cfdb1bbca
commit 9866cfe484

View file

@ -188,10 +188,7 @@ Guile has support for dividing a program into @dfn{modules}. By using
modules, you can group related code together and manage the modules, you can group related code together and manage the
composition of complete programs from largely independent parts. composition of complete programs from largely independent parts.
(Although the module system implementation is in flux, feel free to use it For more details on the module system beyond this introductory material,
anyway. Guile will provide reasonable backwards compatibility.)
Details on the module system beyond this introductory material can be found in
@xref{Modules}. @xref{Modules}.
@menu @menu
@ -239,8 +236,8 @@ session shows a simple example.
@smallexample @smallexample
$ cat /usr/local/share/guile/foo/bar.scm $ cat /usr/local/share/guile/foo/bar.scm
(define-module (foo bar)) (define-module (foo bar)
(export frob) #:export (frob))
(define (frob x) (* 2 x)) (define (frob x) (* 2 x))
@ -262,8 +259,8 @@ 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/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")
@ -275,9 +272,7 @@ scheme@@(guile-user)> (j0 2)
$1 = 0.223890779141236 $1 = 0.223890779141236
@end smallexample @end smallexample
There is also a way to manipulate the module system from C but only @xref{Modules and Extensions}, for more information.
Scheme files can be autoloaded. Thus, we recommend that you define
your modules in Scheme.
@lowersections @lowersections