4 @setfilename guile.info
5 @settitle Guile Reference Manual
7 @set MANUAL_EDITION 1.1
12 @c We no longer use the category "primitive" to distinguish C-defined
13 @c Scheme procedures from those defined in Scheme. Instead, the
14 @c reference manual now includes a C declaration as well as a Scheme
15 @c declaration for each procedure that is available in both Scheme and
18 @c When adding a new reference entry to the Guile manual, please
19 @c document it with @deffn using one of the following categories:
26 @c If the entry is for a new primitive, it should have both a @deffn
27 @c {Scheme Procedure} line and a @deffnx {C Function} line; see the
28 @c manual source for plenty of existing examples of this.
30 @c For {C Function} entries where the return type and all parameter
31 @c types are SCM, we omit the SCMs. This is easier to read and also
32 @c gets round the problem that Texinfo doesn't allow a @deftypefnx
35 @c For a list of Guile primitives that are not yet incorporated into the
36 @c reference manual, see the file `new-docstrings.texi', which holds all
37 @c the docstrings snarfed from the libguile C sources for primitives
38 @c that are not in the reference manual. If you have worked with some
39 @c of these concepts, implemented them, or just happen to know what they
40 @c do, please write up a little explanation -- it would be a big help.
41 @c Alternatively, if you know of any reason why some of these should
42 @c *not* go in the manual, please let the mailing list
43 @c <guile-devel@gnu.org> know.
45 @c Define indices that are used in the Guile Scheme part of the
46 @c reference manual to group stuff according to whether it is R5RS or a
52 @c vnew - For (some) new items, indicates the Guile version in which
53 @c item first appeared. In future, this could be made to expand to
54 @c something like a "New in Guile 45!" banner.
62 @dircategory The Algorithmic Language Scheme
64 * Guile Reference: (guile). The Guile reference manual.
67 @setchapternewpage off
70 Guile Reference Manual
71 Copyright (C) 1996 Free Software Foundation @*
72 Copyright (C) 1997 Free Software Foundation @*
73 Copyright (C) 2000 Free Software Foundation @*
74 Copyright (C) 2001 Free Software Foundation @*
75 Copyright (C) 2002 Free Software Foundation
77 Permission is granted to make and distribute verbatim copies of
78 this manual provided the copyright notice and this permission notice
79 are preserved on all copies.
82 Permission is granted to process this file through TeX and print the
83 results, provided the printed document carries copying permission
84 notice identical to this one except for the removal of this paragraph
85 (this paragraph not being relevant to the printed manual).
88 Permission is granted to copy and distribute modified versions of this
89 manual under the conditions for verbatim copying, provided that the entire
90 resulting derived work is distributed under the terms of a permission
91 notice identical to this one.
93 Permission is granted to copy and distribute translations of this manual
94 into another language, under the above conditions for modified versions,
95 except that this permission notice may be stated in a translation approved
96 by the Free Software Foundation.
101 @comment The title is printed in a large font.
102 @title Guile Reference Manual
103 @subtitle $Id: guile.texi,v 1.17 2002-04-01 18:46:26 ossau Exp $
104 @subtitle For use with Guile @value{VERSION}
108 @c The Guile reference and tutorial manuals were written and edited
109 @c largely by Mark Galassi and Jim Blandy. In particular, Jim wrote the
110 @c original tutorial on Guile's data representation and the C API for
111 @c accessing Guile objects.
113 @c Significant portions were contributed by Gary Houston (contributions
114 @c to POSIX system calls and networking, expect, I/O internals and
115 @c extensions, slib installation, error handling) and Tim Pierce
116 @c (sections on script interpreter triggers, alists, function tracing).
118 @c Tom Lord contributed a great deal of material with early Guile
119 @c snapshots; although most of this text has been rewritten, all of it
120 @c was important, and some of the structure remains.
122 @c Aubrey Jaffer wrote the SCM Scheme implementation and manual upon
123 @c which the Guile program and manual are based. Some portions of the
124 @c SCM and SLIB manuals have been included here verbatim.
126 @c Since Guile 1.4, Neil Jerram has been maintaining and improving the
127 @c reference manual. Among other contributions, he wrote the Basic
128 @c Ideas chapter, developed the tools for keeping the manual in sync
129 @c with snarfed libguile docstrings, and reorganized the structure so as
130 @c to accommodate docstrings for all Guile's primitives.
132 @c Martin Grabmueller has made substantial contributions throughout the
133 @c reference manual in preparation for the Guile 1.6 release, including
134 @c filling out a lot of the documentation of Scheme data types, control
135 @c mechanisms and procedures. In addition, he wrote the documentation
136 @c for Guile's SRFI modules and modules associated with the Guile REPL.
139 @author Cygnus Solution and Los Alamos National Laboratory
140 @author @email{rosalia@@cygnus.com}
143 @author Free Software Foundation and MIT AI Lab
144 @author @email{jimb@@red-bean.com}
147 @author @email{ghouston@@arglist.com}
150 @author @email{twp@@skepsis.com}
153 @author @email{neil@@ossau.uklinux.net}
155 @author Martin Grabmueller
156 @author @email{mgrabmue@@cs.tu-berlin.de}
158 @c The following two commands start the copyright page.
160 @vskip 0pt plus 1filll
161 @vskip 0pt plus 1filll
162 Copyright @copyright{} 1996 Free Software Foundation
164 Copyright @copyright{} 1997 Free Software Foundation
166 Copyright @copyright{} 2000 Free Software Foundation
168 Copyright @copyright{} 2001 Free Software Foundation
170 Copyright @copyright{} 2002 Free Software Foundation
172 Permission is granted to make and distribute verbatim copies of
173 this manual provided the copyright notice and this permission notice
174 are preserved on all copies.
176 Permission is granted to copy and distribute modified versions of this
177 manual under the conditions for verbatim copying, provided that the entire
178 resulting derived work is distributed under the terms of a permission
179 notice identical to this one.
181 Permission is granted to copy and distribute translations of this manual
182 into another language, under the above conditions for modified versions,
183 except that this permission notice may be stated in a translation approved
184 by Free Software Foundation.
191 @c Where to find Guile examples.
192 @set example-dir doc/examples
195 @node Top, Guile License, (dir), (dir)
196 @top The Guile Reference Manual
198 This reference manual documents Guile, GNU's Ubiquitous Intelligent
199 Language for Extensions. It describes how to use Guile in many useful
200 and interesting ways.
202 This Info file contains edition @value{MANUAL_EDITION} of the reference
203 manual, corresponding to Guile version @value{VERSION}.
209 * Guile License:: Conditions for copying and using Guile.
210 * Manual Layout:: How to read the rest of this manual.
211 * Manual Conventions:: Conventional terminology.
213 Part I: Introduction to Guile
215 * What is Guile?:: And what does it do?
216 * Whirlwind Tour:: An introductory whirlwind tour.
217 * Obtaining and Installing Guile::
218 * Reporting Bugs:: Reporting bugs in Guile or this manual.
220 Part II: Programming with Guile
222 * Programming Intro:: Introduction to this part.
223 * Programming Overview:: An overview of Guile programming.
224 * Scheme Intro:: Introduction to Guile Scheme.
225 * Basic Ideas:: Basic ideas in Scheme.
226 * Guile Scripting:: How to write Guile scripts.
227 * Command Line Handling:: Command line options and arguments.
228 * Libguile Intro:: Using Guile as an extension language.
229 * Guile API:: Overview of the Guile API.
230 * Data Representation:: Data representation in Guile.
231 * GH:: The deprecated GH interface.
232 * Debugger User Interface::
233 * Autoconf Support:: Guile-specific configure.in macros.
234 * Miscellaneous Tools:: Snarfing, linting, etc.
235 * Further Reading:: Where to find out more about Scheme programming.
237 Part III: Guile API Reference
239 * Reference Intro:: Introduction to the Guile API reference.
240 * Simple Data Types:: Numbers, strings, booleans and so on.
241 * Compound Data Types:: Data types for holding other data.
242 * Procedures and Macros:: Procedures and macros.
243 * Utility Functions:: General utility functions.
244 * Binding Constructs:: Definitions and variable bindings.
245 * Control Mechanisms:: Controlling the flow of program execution.
246 * Input and Output:: Ports, reading and writing.
247 * Read/Load/Eval:: Reading and evaluating Scheme code.
248 * Memory Management:: Memory management and garbage collection.
249 * Objects:: Low level object orientation support.
250 * Modules:: Designing reusable code libraries.
251 * Scheduling:: Threads, mutexes, asyncs and dynamic roots.
252 * Options and Config:: Runtime options and configuration.
253 * Translation:: Support for translating other languages.
254 * Debugging:: Internal debugging interface.
255 * Deprecated:: Features that are planned to disappear.
257 Part IV: Guile Modules
259 * SLIB:: Using the SLIB Scheme library.
260 * POSIX:: POSIX system calls and networking.
261 * SRFI Support:: Support for various SRFIs.
262 * Readline Support:: Module for using the readline library.
263 * Value History:: Maintaining a value history in the REPL.
264 * Pretty Printing:: Nicely formatting Scheme objects for output.
265 * Formatted Output:: The @code{format} procedure.
266 * Rx Regexps:: The Rx regular expression library.
267 * Expect:: Controlling interactive programs with Guile.
268 * The Scheme shell (scsh):: Using scsh interfaces in Guile.
280 @include preface.texi
284 @unnumbered{Part I: Introduction to Guile}
290 @node Programming Intro
291 @unnumbered Part II: Programming with Guile
293 In this part of the manual, we aim to present a wide ranging picture of
294 what it means to program using Guile, to provide guidance, practical
295 guidelines and tips for @emph{how} to program in Guile, and to document
296 the tools that are available to help you with your programming. For
297 detailed reference information on the variables, functions etc. that
298 make up Guile's application programming interface (API), please refer to
299 Part III (@pxref{Reference Intro,,Part III --- Guile API Reference}).
301 We begin in the first chapter of this part by looking at the programming
304 @include program.texi
305 @include scheme-intro.texi
306 @include scheme-ideas.texi
307 @include scripts.texi
308 @include script-getopt.texi
311 @include data-rep.texi
313 @include debugging.texi
314 @include autoconf.texi
316 @include scheme-reading.texi
319 @node Reference Intro
320 @unnumbered Part III: Guile API Reference
322 Guile provides an application programming interface (@dfn{API}) to
323 developers in two core languages: Scheme and C. This part of the manual
324 contains reference documentation for all of the functionality that is
325 available through both Scheme and C interfaces.
327 @include scheme-data.texi
328 @include scheme-compound.texi
329 @include scheme-procedures.texi
330 @include scheme-utility.texi
331 @include scheme-binding.texi
332 @include scheme-control.texi
333 @include scheme-io.texi
334 @include scheme-evaluation.texi
335 @include scheme-memory.texi
336 @include scheme-modules.texi
337 @include scheme-scheduling.texi
338 @c object orientation support here
339 @include scheme-options.texi
340 @include scheme-translation.texi
341 @include scheme-debug.texi
342 @include deprecated.texi
346 @unnumbered{Part IV: Guile Modules}
351 @include srfi-modules.texi
352 @include repl-modules.texi
353 @include misc-modules.texi
362 @include indices.texi
363 @include scheme-indices.texi