Ran a (docstring-process-module "(guile)") and moved entries from
authorMarius Vollmer <mvo@zagadka.de>
Tue, 24 Aug 2004 16:40:54 +0000 (16:40 +0000)
committerMarius Vollmer <mvo@zagadka.de>
Tue, 24 Aug 2004 16:40:54 +0000 (16:40 +0000)
new-docstrings.texi to their appropriate place.

doc/ref/api-compound.texi
doc/ref/api-data.texi
doc/ref/api-io.texi
doc/ref/api-memory.texi
doc/ref/api-modules.texi
doc/ref/api-scheduling.texi
doc/ref/api-utility.texi
doc/ref/new-docstrings.texi

index f117e1c..9d9eec3 100644 (file)
@@ -308,7 +308,7 @@ Return the number of elements in list @var{lst}.
 
 @deffn {Scheme Procedure} last-pair lst
 @deffnx {C Function} scm_last_pair (lst)
-Return a pointer to the last pair in @var{lst}, signalling an error if
+Return the last pair in @var{lst}, signalling an error if
 @var{lst} is circular.
 @end deffn
 
@@ -2379,6 +2379,16 @@ then it can use @var{size} to avoid rehashing when initial entries are
 added.
 @end deffn
 
+@deffn {Scheme Procedure} hash-table? obj
+@deffnx {C Function} scm_hash_table_p (obj)
+Return @code{#t} if @var{obj} is a hash table.
+@end deffn
+
+@deffn {Scheme Procedure} hash-clear! table
+@deffnx {C Function} scm_hash_clear_x (table)
+Remove all items from TABLE (without triggering a resize).
+@end deffn
+
 @deffn {Scheme Procedure} hash-ref table key [dflt]
 @deffnx {Scheme Procedure} hashq-ref table key [dflt]
 @deffnx {Scheme Procedure} hashv-ref table key [dflt]
index 28e580f..3cb6a06 100755 (executable)
@@ -588,6 +588,16 @@ Return @code{#t} if @var{x} is either @samp{+inf.0} or @samp{-inf.0},
 Return @code{#t} if @var{x} is @samp{+nan.0}, @code{#f} otherwise.
 @end deffn
 
+@deffn {Scheme Procedure} nan
+@deffnx {C Function} scm_nan ()
+Return NaN.
+@end deffn
+
+@deffn {Scheme Procedure} inf
+@deffnx {C Function} scm_inf ()
+Return Inf.
+@end deffn
+
 @deffn {Scheme Procedure} numerator x
 @deffnx {C Function} scm_numerator (x)
 Return the numerator of the rational number @var{x}.
@@ -887,6 +897,16 @@ The C function @code{scm_lcm} always takes two arguments, while the
 Scheme function can take an arbitrary number.
 @end deffn
 
+@deffn {Scheme Procedure} modulo-expt n k m
+@deffnx {C Function} scm_modulo_expt (n, k, m)
+Return @var{n} raised to the integer exponent
+@var{k}, modulo @var{m}.
+
+@lisp
+(modulo-expt 2 3 5)
+   @result{} 3
+@end lisp
+@end deffn
 
 @node Comparison
 @subsubsection Comparison Predicates
index d5ba25b..4a38a83 100644 (file)
@@ -108,14 +108,15 @@ and return @code{#f} otherwise.  If @code{char-ready?} returns
 @code{#t} then the next @code{read-char} operation on
 @var{port} is guaranteed not to hang.  If @var{port} is a file
 port at end of file then @code{char-ready?} returns @code{#t}.
-@footnote{@code{char-ready?} exists to make it possible for a
+
+@code{char-ready?} exists to make it possible for a
 program to accept characters from interactive ports without
 getting stuck waiting for input.  Any input editors associated
 with such ports must make sure that characters whose existence
 has been asserted by @code{char-ready?} cannot be rubbed out.
 If @code{char-ready?} were to return @code{#f} at end of file,
 a port at end of file would be indistinguishable from an
-interactive port that has no ready characters.}
+interactive port that has no ready characters.
 @end deffn
 
 @rnindex read-char
@@ -141,7 +142,9 @@ Note that this function does not update @code{port-line} and
 Return the next character available from @var{port},
 @emph{without} updating @var{port} to point to the following
 character.  If no more characters are available, the
-end-of-file object is returned.@footnote{The value returned by
+end-of-file object is returned.
+
+The value returned by
 a call to @code{peek-char} is the same as the value that would
 have been returned by a call to @code{read-char} on the same
 port.  The only difference is that the very next call to
@@ -149,7 +152,7 @@ port.  The only difference is that the very next call to
 return the value returned by the preceding call to
 @code{peek-char}.  In particular, a call to @code{peek-char} on
 an interactive port will hang waiting for input whenever a call
-to @code{read-char} would have hung.}
+to @code{read-char} would have hung.
 @end deffn
 
 @deffn {Scheme Procedure} unread-char cobj [port]
@@ -248,10 +251,12 @@ Send a newline to @var{port}.
 If @var{port} is omitted, send to the current output port.
 @end deffn
 
-@deffn {Scheme Procedure} port-with-print-state port pstate
+@deffn {Scheme Procedure} port-with-print-state port [pstate]
 @deffnx {C Function} scm_port_with_print_state (port, pstate)
 Create a new port which behaves like @var{port}, but with an
-included print state @var{pstate}.
+included print state @var{pstate}.  @var{pstate} is optional.
+If @var{pstate} isn't supplied and @var{port} already has
+a print state, the old print state is reused.
 @end deffn
 
 @deffn {Scheme Procedure} print-options-interface [setting]
@@ -391,7 +396,7 @@ Truncates the object referred to by @var{object} to at most
 @var{length} bytes.  @var{object} can be a string containing a
 file name or an integer file descriptor or a port.
 @var{length} may be omitted if @var{object} is not a file name,
-in which case the truncation occurs at the current port.
+in which case the truncation occurs at the current port
 position.  The return value is unspecified.
 @end deffn
 
index 62bc23e..8b01594 100644 (file)
@@ -323,13 +323,13 @@ To implement a mapping from source code expressions to the procedures
 they constitute a doubly-weak table has to be used.
 
 @menu
-* Weak key hashes::
+* Weak hash tables::
 * Weak vectors::
 @end menu
 
 
-@node Weak key hashes
-@subsubsection Weak key hashes
+@node Weak hash tables
+@subsubsection Weak hash tables
 
 @deffn {Scheme Procedure} make-weak-key-hash-table size
 @deffnx {Scheme Procedure} make-weak-value-hash-table size
@@ -356,19 +356,6 @@ table. Note that a doubly weak hash table is neither a weak key
 nor a weak value hash table.
 @end deffn
 
-@deffn {Scheme Procedure} make-weak-value-hash-table k
-@end deffn
-
-@deffn {Scheme Procedure} weak-value-hash-table? x
-@end deffn
-
-@deffn {Scheme Procedure} make-doubly-weak-hash-table k
-@end deffn
-
-@deffn {Scheme Procedure} doubly-weak-hash-table? x
-@end deffn
-
-
 @node Weak vectors
 @subsubsection Weak vectors
 
index 822c396..c699e88 100644 (file)
@@ -149,6 +149,7 @@ there is still some flux.
 * General Information about Modules::  Guile module basics.
 * Using Guile Modules::         How to use existing modules.
 * Creating Guile Modules::      How to package your code into modules.
+* Module System Reflection::    Accessing module objects at run-time.
 * Module System Quirks::        Strange things to be aware of.
 * Included Guile Modules::      Which modules come with Guile?
 * Accessing Modules from C::    How to work with modules with C code.
@@ -424,6 +425,47 @@ Equivalent to @code{(begin (define foo ...) (export foo))}.
 @end deffn
 @c end
 
+@node Module System Reflection
+@subsubsection Module System Reflection
+
+The previous sections have described a declarative view of the module
+system.  You can also work with it programmatically by accessing and
+modifying various parts of the Scheme objects that Guile uses to
+implement the module system.
+
+At any time, there is a @dfn{current module}.  This module is the one
+where a top-level @code{define} and similar syntax will add new
+bindings.  You can find other module objects with @code{resolve-module},
+for example.
+
+These module objects can be used as the second argument to @code{eval}.
+
+@deffn {Scheme Procedure} current-module
+Return the current module object.
+@end deffn
+
+@deffn {Scheme Procedure} set-current-module module
+Set the current module to @var{module} and return
+the previous current module.
+@end deffn
+
+@deffn {Scheme Procedure} resolve-module name
+Find the module named @var{name} and return it.  When it has not already
+been defined, try to auto-load it.  When it can't be found that way
+either, create an empty module.  The name is a list of symbols.
+@end deffn
+
+@deffn {Scheme Procedure} resolve-interface name
+Find the module named @var{name} as with @code{resolve-module} and
+return its interface.  The interface of a module is also a module
+object, but it contains only the exported bindings.
+@end deffn
+
+@deffn {Scheme Procedure} module-use! module interface
+Add @var{interface} to the front of the use-list of @var{module}.  Both
+arguments should be module objects, and @var{interface} should very
+likely be a module returned by @code{resolve-interface}.
+@end deffn
 
 @node Module System Quirks
 @subsubsection Module System Quirks
@@ -956,6 +998,44 @@ guile> (apropos "j0")
 
 That's it!
 
+@deffn {Scheme Procedure} load-extension lib init
+@deffnx {C Function} scm_load_extension (lib, init)
+Load and initialize the extension designated by LIB and INIT.
+When there is no pre-registered function for LIB/INIT, this is
+equivalent to
+
+@lisp
+(dynamic-call INIT (dynamic-link LIB))
+@end lisp
+
+When there is a pre-registered function, that function is called
+instead.
+
+Normally, there is no pre-registered function.  This option exists
+only for situations where dynamic linking is unavailable or unwanted.
+In that case, you would statically link your program with the desired
+library, and register its init function right after Guile has been
+initialized.
+
+LIB should be a string denoting a shared library without any file type
+suffix such as ".so".  The suffix is provided automatically.  It
+should also not contain any directory components.  Libraries that
+implement Guile Extensions should be put into the normal locations for
+shared libraries.  We recommend to use the naming convention
+libguile-bla-blum for a extension related to a module `(bla blum)'.
+
+The normal way for a extension to be used is to write a small Scheme
+file that defines a module, and to load the extension into this
+module.  When the module is auto-loaded, the extension is loaded as
+well.  For example,
+
+@lisp
+(define-module (bla blum))
+
+(load-extension "libguile-bla-blum" "bla_init_blum")
+@end lisp
+@end deffn
+
 @node Variables
 @subsection Variables
 @tpindex Variables
index f85ea4a..a61f2ed 100644 (file)
@@ -39,14 +39,17 @@ returned.
 
 @deffn {Scheme Procedure} make-arbiter name
 @deffnx {C Function} scm_make_arbiter (name)
-Return an arbiter object, initially unlocked.  Currently @var{name} is
-only used for diagnostic output.
+Return an object of type arbiter and name @var{name}. Its
+state is initially unlocked.  Arbiters are a way to achieve
+process synchronization.
 @end deffn
 
 @deffn {Scheme Procedure} try-arbiter arb
 @deffnx {C Function} scm_try_arbiter (arb)
-If @var{arb} is unlocked, then lock it and return @code{#t}.  If
-@var{arb} is already locked, then do nothing and return @code{#f}.
+@deffnx {C Function} scm_try_arbiter (arb)
+If @var{arb} is unlocked, then lock it and return @code{#t}.
+If @var{arb} is already locked, then do nothing and return
+@code{#f}.
 @end deffn
 
 @deffn {Scheme Procedure} release-arbiter arb
@@ -323,8 +326,15 @@ threads must rendezvous.
 @node Low level thread primitives
 @subsubsection Low level thread primitives
 
-@c NJFIXME no current mechanism for making sure that these docstrings
-@c are in sync.
+@deffn {Scheme Procedure} all-threads
+@deffnx {C Function} scm_all_threads ()
+Return a list of all threads.
+@end deffn
+
+@deffn {Scheme Procedure} current-thread
+@deffnx {C Function} scm_current_thread ()
+Return the thread that called this function.
+@end deffn
 
 @c begin (texi-doc-string "guile" "call-with-new-thread")
 @deffn {Scheme Procedure} call-with-new-thread thunk error-handler
@@ -346,6 +356,11 @@ Suspend execution of the calling thread until the target @var{thread}
 terminates, unless the target @var{thread} has already terminated.
 @end deffn
 
+@deffn {Scheme Procedure} thread-exited? thread
+@deffnx {C Function} scm_thread_exited_p (thread)
+Return @code{#t} iff @var{thread} has exited.
+@end deffn
+
 @c begin (texi-doc-string "guile" "yield")
 @deffn {Scheme Procedure} yield
 If one or more threads are waiting to execute, calling yield forces an
@@ -357,6 +372,11 @@ immediate context switch to one of them. Otherwise, yield has no effect.
 Make a new condition variable.
 @end deffn
 
+@deffn {Scheme Procedure} make-fair-condition-variable
+@deffnx {C Function} scm_make_fair_condition_variable ()
+Make a new fair condition variable.
+@end deffn
+
 @c begin (texi-doc-string "guile" "wait-condition-variable")
 @deffn {Scheme Procedure} wait-condition-variable cond-var mutex [time]
 Wait until @var{cond-var} has been signalled.  While waiting,
@@ -610,6 +630,12 @@ Set the value associated with @var{fluid} in the current dynamic root.
 so that the given procedure and each procedure called by it access the
 given values.  After the procedure returns, the old values are restored.
 
+@deffn {Scheme Procedure} with-fluid* fluid value thunk
+@deffnx {C Function} scm_with_fluid (fluid, value, thunk)
+Set @var{fluid} to @var{value} temporarily, and call @var{thunk}.
+@var{thunk} must be a procedure with no argument.
+@end deffn
+
 @deffn {Scheme Procedure} with-fluids* fluids values thunk
 @deffnx {C Function} scm_with_fluids (fluids, values, thunk)
 Set @var{fluids} to @var{values} temporary, and call @var{thunk}.
index 8cc662f..669bf1b 100644 (file)
@@ -355,7 +355,7 @@ copies any pairs in the cars of the input lists.
 @deffn {Scheme Procedure} copy-tree obj
 @deffnx {C Function} scm_copy_tree (obj)
 Recursively copy the data tree that is bound to @var{obj}, and return a
-pointer to the new data structure.  @code{copy-tree} recurses down the
+the new data structure.  @code{copy-tree} recurses down the
 contents of both pairs and vectors (since both cons cells and vector
 cells may point to arbitrary objects), and stops recursing when it hits
 any other object.
dissimilarity index 99%
index 79d4514..91e9e96 100644 (file)
@@ -1,743 +1,8 @@
-
-@c module (guile)
-
-@deffn {Scheme Procedure} environment? obj
-@deffnx {C Function} scm_environment_p (obj)
-Return @code{#t} if @var{obj} is an environment, or @code{#f}
-otherwise.
-@end deffn
-
-@deffn {Scheme Procedure} environment-bound? env sym
-@deffnx {C Function} scm_environment_bound_p (env, sym)
-Return @code{#t} if @var{sym} is bound in @var{env}, or
-@code{#f} otherwise.
-@end deffn
-
-@deffn {Scheme Procedure} environment-ref env sym
-@deffnx {C Function} scm_environment_ref (env, sym)
-Return the value of the location bound to @var{sym} in
-@var{env}. If @var{sym} is unbound in @var{env}, signal an
-@code{environment:unbound} error.
-@end deffn
-
-@deffn {Scheme Procedure} environment-fold env proc init
-@deffnx {C Function} scm_environment_fold (env, proc, init)
-Iterate over all the bindings in @var{env}, accumulating some
-value.
-For each binding in @var{env}, apply @var{proc} to the symbol
-bound, its value, and the result from the previous application
-of @var{proc}.
-Use @var{init} as @var{proc}'s third argument the first time
-@var{proc} is applied.
-If @var{env} contains no bindings, this function simply returns
-@var{init}.
-If @var{env} binds the symbol sym1 to the value val1, sym2 to
-val2, and so on, then this procedure computes:
-@lisp
-  (proc sym1 val1
-        (proc sym2 val2
-              ...
-              (proc symn valn
-                    init)))
-@end lisp
-Each binding in @var{env} will be processed exactly once.
-@code{environment-fold} makes no guarantees about the order in
-which the bindings are processed.
-Here is a function which, given an environment, constructs an
-association list representing that environment's bindings,
-using environment-fold:
-@lisp
-  (define (environment->alist env)
-    (environment-fold env
-                      (lambda (sym val tail)
-                        (cons (cons sym val) tail))
-                      '()))
-@end lisp
-@end deffn
-
-@deffn {Scheme Procedure} environment-define env sym val
-@deffnx {C Function} scm_environment_define (env, sym, val)
-Bind @var{sym} to a new location containing @var{val} in
-@var{env}. If @var{sym} is already bound to another location
-in @var{env} and the binding is mutable, that binding is
-replaced.  The new binding and location are both mutable. The
-return value is unspecified.
-If @var{sym} is already bound in @var{env}, and the binding is
-immutable, signal an @code{environment:immutable-binding} error.
-@end deffn
-
-@deffn {Scheme Procedure} environment-undefine env sym
-@deffnx {C Function} scm_environment_undefine (env, sym)
-Remove any binding for @var{sym} from @var{env}. If @var{sym}
-is unbound in @var{env}, do nothing.  The return value is
-unspecified.
-If @var{sym} is already bound in @var{env}, and the binding is
-immutable, signal an @code{environment:immutable-binding} error.
-@end deffn
-
-@deffn {Scheme Procedure} environment-set! env sym val
-@deffnx {C Function} scm_environment_set_x (env, sym, val)
-If @var{env} binds @var{sym} to some location, change that
-location's value to @var{val}.  The return value is
-unspecified.
-If @var{sym} is not bound in @var{env}, signal an
-@code{environment:unbound} error.  If @var{env} binds @var{sym}
-to an immutable location, signal an
-@code{environment:immutable-location} error.
-@end deffn
-
-@deffn {Scheme Procedure} environment-cell env sym for_write
-@deffnx {C Function} scm_environment_cell (env, sym, for_write)
-Return the value cell which @var{env} binds to @var{sym}, or
-@code{#f} if the binding does not live in a value cell.
-The argument @var{for-write} indicates whether the caller
-intends to modify the variable's value by mutating the value
-cell.  If the variable is immutable, then
-@code{environment-cell} signals an
-@code{environment:immutable-location} error.
-If @var{sym} is unbound in @var{env}, signal an
-@code{environment:unbound} error.
-If you use this function, you should consider using
-@code{environment-observe}, to be notified when @var{sym} gets
-re-bound to a new value cell, or becomes undefined.
-@end deffn
-
-@deffn {Scheme Procedure} environment-observe env proc
-@deffnx {C Function} scm_environment_observe (env, proc)
-Whenever @var{env}'s bindings change, apply @var{proc} to
-@var{env}.
-This function returns an object, token, which you can pass to
-@code{environment-unobserve} to remove @var{proc} from the set
-of procedures observing @var{env}.  The type and value of
-token is unspecified.
-@end deffn
-
-@deffn {Scheme Procedure} environment-observe-weak env proc
-@deffnx {C Function} scm_environment_observe_weak (env, proc)
-This function is the same as environment-observe, except that
-the reference @var{env} retains to @var{proc} is a weak
-reference. This means that, if there are no other live,
-non-weak references to @var{proc}, it will be
-garbage-collected, and dropped from @var{env}'s
-list of observing procedures.
-@end deffn
-
-@deffn {Scheme Procedure} environment-unobserve token
-@deffnx {C Function} scm_environment_unobserve (token)
-Cancel the observation request which returned the value
-@var{token}.  The return value is unspecified.
-If a call @code{(environment-observe env proc)} returns
-@var{token}, then the call @code{(environment-unobserve token)}
-will cause @var{proc} to no longer be called when @var{env}'s
-bindings change.
-@end deffn
-
-@deffn {Scheme Procedure} make-leaf-environment
-@deffnx {C Function} scm_make_leaf_environment ()
-Create a new leaf environment, containing no bindings.
-All bindings and locations created in the new environment
-will be mutable.
-@end deffn
-
-@deffn {Scheme Procedure} leaf-environment? object
-@deffnx {C Function} scm_leaf_environment_p (object)
-Return @code{#t} if object is a leaf environment, or @code{#f}
-otherwise.
-@end deffn
-
-@deffn {Scheme Procedure} make-eval-environment local imported
-@deffnx {C Function} scm_make_eval_environment (local, imported)
-Return a new environment object eval whose bindings are the
-union of the bindings in the environments @var{local} and
-@var{imported}, with bindings from @var{local} taking
-precedence. Definitions made in eval are placed in @var{local}.
-Applying @code{environment-define} or
-@code{environment-undefine} to eval has the same effect as
-applying the procedure to @var{local}.
-Note that eval incorporates @var{local} and @var{imported} by
-reference:
-If, after creating eval, the program changes the bindings of
-@var{local} or @var{imported}, those changes will be visible
-in eval.
-Since most Scheme evaluation takes place in eval environments,
-they transparently cache the bindings received from @var{local}
-and @var{imported}. Thus, the first time the program looks up
-a symbol in eval, eval may make calls to @var{local} or
-@var{imported} to find their bindings, but subsequent
-references to that symbol will be as fast as references to
-bindings in finite environments.
-In typical use, @var{local} will be a finite environment, and
-@var{imported} will be an import environment
-@end deffn
-
-@deffn {Scheme Procedure} eval-environment? object
-@deffnx {C Function} scm_eval_environment_p (object)
-Return @code{#t} if object is an eval environment, or @code{#f}
-otherwise.
-@end deffn
-
-@deffn {Scheme Procedure} eval-environment-local env
-@deffnx {C Function} scm_eval_environment_local (env)
-Return the local environment of eval environment @var{env}.
-@end deffn
-
-@deffn {Scheme Procedure} eval-environment-set-local! env local
-@deffnx {C Function} scm_eval_environment_set_local_x (env, local)
-Change @var{env}'s local environment to @var{local}.
-@end deffn
-
-@deffn {Scheme Procedure} eval-environment-imported env
-@deffnx {C Function} scm_eval_environment_imported (env)
-Return the imported environment of eval environment @var{env}.
-@end deffn
-
-@deffn {Scheme Procedure} eval-environment-set-imported! env imported
-@deffnx {C Function} scm_eval_environment_set_imported_x (env, imported)
-Change @var{env}'s imported environment to @var{imported}.
-@end deffn
-
-@deffn {Scheme Procedure} make-import-environment imports conflict_proc
-@deffnx {C Function} scm_make_import_environment (imports, conflict_proc)
-Return a new environment @var{imp} whose bindings are the union
-of the bindings from the environments in @var{imports};
-@var{imports} must be a list of environments. That is,
-@var{imp} binds a symbol to a location when some element of
-@var{imports} does.
-If two different elements of @var{imports} have a binding for
-the same symbol, the @var{conflict-proc} is called with the
-following parameters:  the import environment, the symbol and
-the list of the imported environments that bind the symbol.
-If the @var{conflict-proc} returns an environment @var{env},
-the conflict is considered as resolved and the binding from
-@var{env} is used.  If the @var{conflict-proc} returns some
-non-environment object, the conflict is considered unresolved
-and the symbol is treated as unspecified in the import
-environment.
-The checking for conflicts may be performed lazily, i. e. at
-the moment when a value or binding for a certain symbol is
-requested instead of the moment when the environment is
-created or the bindings of the imports change.
-All bindings in @var{imp} are immutable. If you apply
-@code{environment-define} or @code{environment-undefine} to
-@var{imp}, Guile will signal an
- @code{environment:immutable-binding} error. However,
-notice that the set of bindings in @var{imp} may still change,
-if one of its imported environments changes.
-@end deffn
-
-@deffn {Scheme Procedure} import-environment? object
-@deffnx {C Function} scm_import_environment_p (object)
-Return @code{#t} if object is an import environment, or
-@code{#f} otherwise.
-@end deffn
-
-@deffn {Scheme Procedure} import-environment-imports env
-@deffnx {C Function} scm_import_environment_imports (env)
-Return the list of environments imported by the import
-environment @var{env}.
-@end deffn
-
-@deffn {Scheme Procedure} import-environment-set-imports! env imports
-@deffnx {C Function} scm_import_environment_set_imports_x (env, imports)
-Change @var{env}'s list of imported environments to
-@var{imports}, and check for conflicts.
-@end deffn
-
-@deffn {Scheme Procedure} make-export-environment private signature
-@deffnx {C Function} scm_make_export_environment (private, signature)
-Return a new environment @var{exp} containing only those
-bindings in private whose symbols are present in
-@var{signature}. The @var{private} argument must be an
-environment.
-
-The environment @var{exp} binds symbol to location when
-@var{env} does, and symbol is exported by @var{signature}.
-
-@var{signature} is a list specifying which of the bindings in
-@var{private} should be visible in @var{exp}. Each element of
-@var{signature} should be a list of the form:
-  (symbol attribute ...)
-where each attribute is one of the following:
-@table @asis
-@item the symbol @code{mutable-location}
-  @var{exp} should treat the
-  location bound to symbol as mutable. That is, @var{exp}
-  will pass calls to @code{environment-set!} or
-  @code{environment-cell} directly through to private.
-@item the symbol @code{immutable-location}
-  @var{exp} should treat
-  the location bound to symbol as immutable. If the program
-  applies @code{environment-set!} to @var{exp} and symbol, or
-  calls @code{environment-cell} to obtain a writable value
-  cell, @code{environment-set!} will signal an
-  @code{environment:immutable-location} error. Note that, even
-  if an export environment treats a location as immutable, the
-  underlying environment may treat it as mutable, so its
-  value may change.
-@end table
-It is an error for an element of signature to specify both
-@code{mutable-location} and @code{immutable-location}. If
-neither is specified, @code{immutable-location} is assumed.
-
-As a special case, if an element of signature is a lone
-symbol @var{sym}, it is equivalent to an element of the form
-@code{(sym)}.
-
-All bindings in @var{exp} are immutable. If you apply
-@code{environment-define} or @code{environment-undefine} to
-@var{exp}, Guile will signal an
-@code{environment:immutable-binding} error. However,
-notice that the set of bindings in @var{exp} may still change,
-if the bindings in private change.
-@end deffn
-
-@deffn {Scheme Procedure} export-environment? object
-@deffnx {C Function} scm_export_environment_p (object)
-Return @code{#t} if object is an export environment, or
-@code{#f} otherwise.
-@end deffn
-
-@deffn {Scheme Procedure} export-environment-private env
-@deffnx {C Function} scm_export_environment_private (env)
-Return the private environment of export environment @var{env}.
-@end deffn
-
-@deffn {Scheme Procedure} export-environment-set-private! env private
-@deffnx {C Function} scm_export_environment_set_private_x (env, private)
-Change the private environment of export environment @var{env}.
-@end deffn
-
-@deffn {Scheme Procedure} export-environment-signature env
-@deffnx {C Function} scm_export_environment_signature (env)
-Return the signature of export environment @var{env}.
-@end deffn
-
-@deffn {Scheme Procedure} export-environment-set-signature! env signature
-@deffnx {C Function} scm_export_environment_set_signature_x (env, signature)
-Change the signature of export environment @var{env}.
-@end deffn
-
-@deffn {Scheme Procedure} %compute-slots class
-@deffnx {C Function} scm_sys_compute_slots (class)
-Return a list consisting of the names of all slots belonging to
-class @var{class}, i. e. the slots of @var{class} and of all of
-its superclasses.
-@end deffn
-
-@deffn {Scheme Procedure} get-keyword key l default_value
-@deffnx {C Function} scm_get_keyword (key, l, default_value)
-Determine an associated value for the keyword @var{key} from
-the list @var{l}.  The list @var{l} has to consist of an even
-number of elements, where, starting with the first, every
-second element is a keyword, followed by its associated value.
-If @var{l} does not hold a value for @var{key}, the value
-@var{default_value} is returned.
-@end deffn
-
-@deffn {Scheme Procedure} slot-ref-using-class class obj slot_name
-@deffnx {C Function} scm_slot_ref_using_class (class, obj, slot_name)
-
-@end deffn
-
-@deffn {Scheme Procedure} slot-set-using-class! class obj slot_name value
-@deffnx {C Function} scm_slot_set_using_class_x (class, obj, slot_name, value)
-
-@end deffn
-
-@deffn {Scheme Procedure} class-of x
-@deffnx {C Function} scm_class_of (x)
-Return the class of @var{x}.
-@end deffn
-
-@deffn {Scheme Procedure} %goops-loaded
-@deffnx {C Function} scm_sys_goops_loaded ()
-Announce that GOOPS is loaded and perform initialization
-on the C level which depends on the loaded GOOPS modules.
-@end deffn
-
-@deffn {Scheme Procedure} %method-more-specific? m1 m2 targs
-@deffnx {C Function} scm_sys_method_more_specific_p (m1, m2, targs)
-
-@end deffn
-
-@deffn {Scheme Procedure} find-method . l
-@deffnx {C Function} scm_find_method (l)
-
-@end deffn
-
-@deffn {Scheme Procedure} primitive-generic-generic subr
-@deffnx {C Function} scm_primitive_generic_generic (subr)
-
-@end deffn
-
-@deffn {Scheme Procedure} enable-primitive-generic! . subrs
-@deffnx {C Function} scm_enable_primitive_generic_x (subrs)
-
-@end deffn
-
-@deffn {Scheme Procedure} generic-capability? proc
-@deffnx {C Function} scm_generic_capability_p (proc)
-
-@end deffn
-
-@deffn {Scheme Procedure} %invalidate-method-cache! gf
-@deffnx {C Function} scm_sys_invalidate_method_cache_x (gf)
-
-@end deffn
-
-@deffn {Scheme Procedure} %invalidate-class class
-@deffnx {C Function} scm_sys_invalidate_class (class)
-
-@end deffn
-
-@deffn {Scheme Procedure} %modify-class old new
-@deffnx {C Function} scm_sys_modify_class (old, new)
-
-@end deffn
-
-@deffn {Scheme Procedure} %modify-instance old new
-@deffnx {C Function} scm_sys_modify_instance (old, new)
-
-@end deffn
-
-@deffn {Scheme Procedure} %set-object-setter! obj setter
-@deffnx {C Function} scm_sys_set_object_setter_x (obj, setter)
-
-@end deffn
-
-@deffn {Scheme Procedure} %allocate-instance class initargs
-@deffnx {C Function} scm_sys_allocate_instance (class, initargs)
-Create a new instance of class @var{class} and initialize it
-from the arguments @var{initargs}.
-@end deffn
-
-@deffn {Scheme Procedure} slot-exists? obj slot_name
-@deffnx {C Function} scm_slot_exists_p (obj, slot_name)
-Return @code{#t} if @var{obj} has a slot named @var{slot_name}.
-@end deffn
-
-@deffn {Scheme Procedure} slot-bound? obj slot_name
-@deffnx {C Function} scm_slot_bound_p (obj, slot_name)
-Return @code{#t} if the slot named @var{slot_name} of @var{obj}
-is bound.
-@end deffn
-
-@deffn {Scheme Procedure} slot-set! obj slot_name value
-@deffnx {C Function} scm_slot_set_x (obj, slot_name, value)
-Set the slot named @var{slot_name} of @var{obj} to @var{value}.
-@end deffn
-
-@deffn {Scheme Procedure} slot-exists-using-class? class obj slot_name
-@deffnx {C Function} scm_slot_exists_using_class_p (class, obj, slot_name)
-
-@end deffn
-
-@deffn {Scheme Procedure} slot-bound-using-class? class obj slot_name
-@deffnx {C Function} scm_slot_bound_using_class_p (class, obj, slot_name)
-
-@end deffn
-
-@deffn {Scheme Procedure} %fast-slot-set! obj index value
-@deffnx {C Function} scm_sys_fast_slot_set_x (obj, index, value)
-Set the slot with index @var{index} in @var{obj} to
-@var{value}.
-@end deffn
-
-@deffn {Scheme Procedure} %fast-slot-ref obj index
-@deffnx {C Function} scm_sys_fast_slot_ref (obj, index)
-Return the slot value with index @var{index} from @var{obj}.
-@end deffn
-
-@deffn {Scheme Procedure} @@assert-bound-ref obj index
-@deffnx {C Function} scm_at_assert_bound_ref (obj, index)
-Like @code{assert-bound}, but use @var{index} for accessing
-the value from @var{obj}.
-@end deffn
-
-@deffn {Scheme Procedure} assert-bound value obj
-@deffnx {C Function} scm_assert_bound (value, obj)
-Return @var{value} if it is bound, and invoke the
-@var{slot-unbound} method of @var{obj} if it is not.
-@end deffn
-
-@deffn {Scheme Procedure} unbound? obj
-@deffnx {C Function} scm_unbound_p (obj)
-Return @code{#t} if @var{obj} is unbound.
-@end deffn
-
-@deffn {Scheme Procedure} make-unbound
-@deffnx {C Function} scm_make_unbound ()
-Return the unbound value.
-@end deffn
-
-@deffn {Scheme Procedure} accessor-method-slot-definition obj
-@deffnx {C Function} scm_accessor_method_slot_definition (obj)
-Return the slot definition of the accessor @var{obj}.
-@end deffn
-
-@deffn {Scheme Procedure} method-procedure obj
-@deffnx {C Function} scm_method_procedure (obj)
-Return the procedure of the method @var{obj}.
-@end deffn
-
-@deffn {Scheme Procedure} method-specializers obj
-@deffnx {C Function} scm_method_specializers (obj)
-Return specializers of the method @var{obj}.
-@end deffn
-
-@deffn {Scheme Procedure} method-generic-function obj
-@deffnx {C Function} scm_method_generic_function (obj)
-Return the generic function for the method @var{obj}.
-@end deffn
-
-@deffn {Scheme Procedure} generic-function-methods obj
-@deffnx {C Function} scm_generic_function_methods (obj)
-Return the methods of the generic function @var{obj}.
-@end deffn
-
-@deffn {Scheme Procedure} generic-function-name obj
-@deffnx {C Function} scm_generic_function_name (obj)
-Return the name of the generic function @var{obj}.
-@end deffn
-
-@deffn {Scheme Procedure} class-environment obj
-@deffnx {C Function} scm_class_environment (obj)
-Return the environment of the class @var{obj}.
-@end deffn
-
-@deffn {Scheme Procedure} class-slots obj
-@deffnx {C Function} scm_class_slots (obj)
-Return the slot list of the class @var{obj}.
-@end deffn
-
-@deffn {Scheme Procedure} class-precedence-list obj
-@deffnx {C Function} scm_class_precedence_list (obj)
-Return the class precedence list of the class @var{obj}.
-@end deffn
-
-@deffn {Scheme Procedure} class-direct-methods obj
-@deffnx {C Function} scm_class_direct_methods (obj)
-Return the direct methods of the class @var{obj}
-@end deffn
-
-@deffn {Scheme Procedure} class-direct-subclasses obj
-@deffnx {C Function} scm_class_direct_subclasses (obj)
-Return the direct subclasses of the class @var{obj}.
-@end deffn
-
-@deffn {Scheme Procedure} class-direct-slots obj
-@deffnx {C Function} scm_class_direct_slots (obj)
-Return the direct slots of the class @var{obj}.
-@end deffn
-
-@deffn {Scheme Procedure} class-direct-supers obj
-@deffnx {C Function} scm_class_direct_supers (obj)
-Return the direct superclasses of the class @var{obj}.
-@end deffn
-
-@deffn {Scheme Procedure} class-name obj
-@deffnx {C Function} scm_class_name (obj)
-Return the class name of @var{obj}.
-@end deffn
-
-@deffn {Scheme Procedure} instance? obj
-@deffnx {C Function} scm_instance_p (obj)
-Return @code{#t} if @var{obj} is an instance.
-@end deffn
-
-@deffn {Scheme Procedure} %inherit-magic! class dsupers
-@deffnx {C Function} scm_sys_inherit_magic_x (class, dsupers)
-
-@end deffn
-
-@deffn {Scheme Procedure} %prep-layout! class
-@deffnx {C Function} scm_sys_prep_layout_x (class)
-
-@end deffn
-
-@deffn {Scheme Procedure} %initialize-object obj initargs
-@deffnx {C Function} scm_sys_initialize_object (obj, initargs)
-Initialize the object @var{obj} with the given arguments
-@var{initargs}.
-@end deffn
-
-@deffn {Scheme Procedure} make . args
-@deffnx {C Function} scm_make (args)
-Make a new object.  @var{args} must contain the class and
-all necessary initialization information.
-@end deffn
-
-@deffn {Scheme Procedure} slot-ref obj slot_name
-@deffnx {C Function} scm_slot_ref (obj, slot_name)
-Return the value from @var{obj}'s slot with the name
-@var{slot_name}.
-@end deffn
-
-@deffn {Scheme Procedure} %tag-body body
-@deffnx {C Function} scm_sys_tag_body (body)
-Internal GOOPS magic---don't use this function!
-@end deffn
-
-@deffn {Scheme Procedure} list*
-implemented by the C function "scm_cons_star"
-@end deffn
-
-@deffn {Scheme Procedure} set-current-module module
-@deffnx {C Function} scm_set_current_module (module)
-Set the current module to @var{module} and return
-the previous current module.
-@end deffn
-
-@deffn {Scheme Procedure} current-module
-@deffnx {C Function} scm_current_module ()
-Return the current module.
-@end deffn
-
-@deffn {Scheme Procedure} c-clear-registered-modules
-Destroy the list of modules registered with the current Guile process.
-The return value is unspecified.  @strong{Warning:} this function does
-not actually unlink or deallocate these modules, but only destroys the
-records of which modules have been loaded.  It should therefore be used
-only by module bookkeeping operations.
-@end deffn
-
-@deffn {Scheme Procedure} c-registered-modules
-Return a list of the object code modules that have been imported into
-the current Guile process.  Each element of the list is a pair whose
-car is the name of the module, and whose cdr is the function handle
-for that module's initializer function.  The name is the string that
-has been passed to scm_register_module_xxx.
-@end deffn
-
-@deffn {Scheme Procedure} include-deprecated-features
-Return @code{#t} iff deprecated features should be included
-in public interfaces.
-@end deffn
-
-@deffn {Scheme Procedure} issue-deprecation-warning . msgs
-Output @var{msgs} to @code{(current-error-port)} when this
-is the first call to @code{issue-deprecation-warning} with
-this specific @var{msg}.  Do nothing otherwise.
-The argument @var{msgs} should be a list of strings;
-they are printed in turn, each one followed by a newline.
-@end deffn
-
-@deffn {Scheme Procedure} valid-object-procedure? proc
-@deffnx {C Function} scm_valid_object_procedure_p (proc)
-Return @code{#t} iff @var{proc} is a procedure that can be used with @code{set-object-procedure}.  It is always valid to use a closure constructed by @code{lambda}.
-@end deffn
-
-@deffn {Scheme Procedure} %get-pre-modules-obarray
-@deffnx {C Function} scm_get_pre_modules_obarray ()
-Return the obarray that is used for all new bindings before the module system is booted.  The first call to @code{set-current-module} will boot the module system.
-@end deffn
-
-@deffn {Scheme Procedure} standard-interface-eval-closure module
-@deffnx {C Function} scm_standard_interface_eval_closure (module)
-Return a interface eval closure for the module @var{module}. Such a closure does not allow new bindings to be added.
-@end deffn
-
-@deffn {Scheme Procedure} env-module env
-@deffnx {C Function} scm_env_module (env)
-Return the module of @var{ENV}, a lexical environment.
-@end deffn
-
-@deffn {Scheme Procedure} load-extension lib init
-@deffnx {C Function} scm_load_extension (lib, init)
-Load and initialize the extension designated by LIB and INIT.
-When there is no pre-registered function for LIB/INIT, this is
-equivalent to
-
-@lisp
-(dynamic-call INIT (dynamic-link LIB))
-@end lisp
-
-When there is a pre-registered function, that function is called
-instead.
-
-Normally, there is no pre-registered function.  This option exists
-only for situations where dynamic linking is unavailable or unwanted.
-In that case, you would statically link your program with the desired
-library, and register its init function right after Guile has been
-initialized.
-
-LIB should be a string denoting a shared library without any file type
-suffix such as ".so".  The suffix is provided automatically.  It
-should also not contain any directory components.  Libraries that
-implement Guile Extensions should be put into the normal locations for
-shared libraries.  We recommend to use the naming convention
-libguile-bla-blum for a extension related to a module `(bla blum)'.
-
-The normal way for a extension to be used is to write a small Scheme
-file that defines a module, and to load the extension into this
-module.  When the module is auto-loaded, the extension is loaded as
-well.  For example,
-
-@lisp
-(define-module (bla blum))
-
-(load-extension "libguile-bla-blum" "bla_init_blum")
-@end lisp
-@end deffn
-
-@deffn {Scheme Procedure} single-active-thread?
-implemented by the C function "scm_single_thread_p"
-@end deffn
-
-@deffn {Scheme Procedure} object-address obj
-@deffnx {C Function} scm_object_address (obj)
-Return an integer that for the lifetime of @var{obj} is uniquely
-returned by this function for @var{obj}
-@end deffn
-
-@deffn {Scheme Procedure} nan
-@deffnx {C Function} scm_nan ()
-Return NaN.
-@end deffn
-
-@deffn {Scheme Procedure} inf
-@deffnx {C Function} scm_inf ()
-Return Inf.
-@end deffn
-
-@deffn {Scheme Procedure} set-debug-cell-accesses! flag
-@deffnx {C Function} scm_set_debug_cell_accesses_x (flag)
-This function is used to turn on checking for a debug version of GUILE. This version does not support this functionality
-
-@end deffn
-
-@deffn {Scheme Procedure} all-threads
-implemented by the C function "scm_all_threads"
-@end deffn
-
-@deffn {Scheme Procedure} current-thread
-implemented by the C function "scm_current_thread"
-@end deffn
-
-@deffn {Scheme Procedure} standard-eval-closure module
-@deffnx {C Function} scm_standard_eval_closure (module)
-Return an eval closure for the module @var{module}.
-@end deffn
-
-@deffn {Scheme Procedure} mask-signals
-@deffnx {C Function} scm_mask_signals ()
-Mask signals. The returned value is not specified.
-@end deffn
-
-@deffn {Scheme Procedure} unmask-signals
-@deffnx {C Function} scm_unmask_signals ()
-Unmask signals. The returned value is not specified.
-@end deffn
-
-@deffn {Scheme Procedure} noop . args
-@deffnx {C Function} scm_noop (args)
-Do nothing.  When called without arguments, return @code{#f},
-otherwise return the first argument.
-@end deffn
-
-@deffn {Scheme Procedure} system-async thunk
-@deffnx {C Function} scm_system_async (thunk)
-This function is deprecated.  You can use @var{thunk} directly
-instead of explicitely creating an async object.
-
-@end deffn
+@c module-for-docstring (guile)
+
+
+@deffn {Scheme Procedure} inf? n
+@deffnx {C Function} scm_inf_p (n)
+Return @code{#t} if @var{n} is infinite, @code{#f}
+otherwise.
+@end deffn