guile-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

guile/guile-core/doc intro.texi


From: Marius Vollmer
Subject: guile/guile-core/doc intro.texi
Date: Sat, 24 Mar 2001 16:31:10 -0800

CVSROOT:        /cvs
Module name:    guile
Changes by:     Marius Vollmer <address@hidden> 01/03/24 16:31:10

Modified files:
        guile-core/doc : intro.texi 

Log message:
        * intro.texi (Modules and Extensions): Some short text about
        dynamic libraries and modules.

CVSWeb URLs:
http://subversions.gnu.org/cgi-bin/cvsweb/guile/guile-core/doc/intro.texi.diff?r1=1.3&r2=1.4

Patches:
Index: guile/guile-core/doc/intro.texi
diff -u guile/guile-core/doc/intro.texi:1.3 guile/guile-core/doc/intro.texi:1.4
--- guile/guile-core/doc/intro.texi:1.3 Fri Mar 23 08:16:15 2001
+++ guile/guile-core/doc/intro.texi     Sat Mar 24 16:31:10 2001
@@ -1,4 +1,4 @@
address@hidden $Id: intro.texi,v 1.3 2001/03/23 16:16:15 ossau Exp $
address@hidden $Id: intro.texi,v 1.4 2001/03/25 00:31:10 mvo Exp $
 
 @page
 @node What is Guile?
@@ -63,7 +63,7 @@
 * Guile Scripts::               
 * Linking Programs With Guile::  
 * Writing Extensions for Guile::  
-* Writing Guile Modules::       
+* Guile Modules::               
 @end menu
 
 
@@ -688,20 +688,56 @@
 To see how these Guile extensions via shared libraries relate to the
 module system, see below REFFIXME.
 
address@hidden Writing Guile Modules
address@hidden Writing Guile Modules
address@hidden Guile Modules
address@hidden Guile Modules
 
 Guile has support for dividing a program into @dfn{modules}.  By using
-modules, you can group related code together and manage the composition
-of complete programs from their largely independent parts.
+modules, you can group related code together and manage the
+composition of complete programs from largely independent parts.
 
 (The module system is in flux, and will likely look very different in
 the future.  Feel free to use the existing system anyway.  Guile will
 provide reasonable backwards compatability.)
 
-[[ more stuff to follow: how to load third-party modules, how to write
-new modules, how to arrange for autoloading, how to load shared
-libraries as modules. ]]
address@hidden
+* Using Guile Modules::         
+* Writing New Modules::         
+* Modules and Extensions::      
address@hidden menu
+
address@hidden Using Guile Modules
address@hidden Using Existing Modules
+
+To be written.
+
address@hidden Writing New Modules
address@hidden Writing New Modules
+
+To be written.
+
address@hidden Modules and Extensions
address@hidden Modules and Extensions
+
+In addition to Scheme code you can also put new procedures and other
+named features that are provided by an extension into a module.
+
+You do this by writing a small Scheme file that defines the module.
+That Scheme file in turn invokes @code{dynamic-link} and
address@hidden as explained above to make the extension
+available.
+
+Suppose we want to put the Bessel function @code{j0} from the example
+extension into a module called @code{(math bessel)}.  We would have to
+write a Scheme file with this contents
+
address@hidden
+(define-module (math bessel))
+
+(dynamic-call "init_bessel" (dynamic-link "libguile-bessel"))
address@hidden smallexample
+
+The file should of course be saved in the right place for autolading,
+for example as @file{/usr/local/share/guile/math/bessel.scm}.
 
 @page
 @node Reporting Bugs



reply via email to

[Prev in Thread] Current Thread [Next in Thread]