* boot-9.scm (process-define-module): Handle #:duplicates.
[bpt/guile.git] / doc / ref / guile.texi
CommitLineData
38a93523
NJ
1\input texinfo
2@c -*-texinfo-*-
3@c %**start of header
4@setfilename guile.info
5@settitle Guile Reference Manual
370babab 6@set guile
9401323e 7@set MANUAL_EDITION 1.1
38a93523
NJ
8@c %**end of header
9
2a946b44 10@c Notes
370babab 11@c
2a946b44
NJ
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
16@c C.
370babab 17@c
2a946b44
NJ
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:
20@c
21@c {Scheme Procedure}
22@c {Scheme Syntax}
23@c {C Function}
24@c {C Macro}
25@c
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.
29@c
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
33@c inside a @deffn.
38a93523 34@c
370babab
NJ
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.
2a946b44
NJ
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.
38a93523
NJ
44
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
47@c Guile extension.
5c4b24e1 48@defcodeindex rn
38a93523
NJ
49
50@include version.texi
51
0624ce33
NJ
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.
198586ed
NJ
55@macro vnew{VERSION}
56@end macro
57
38a93523
NJ
58@c @iftex
59@c @cropmarks
60@c @end iftex
61
62@dircategory The Algorithmic Language Scheme
63@direntry
c16da59f 64* Guile Reference: (guile). The Guile reference manual.
38a93523
NJ
65@end direntry
66
67@setchapternewpage off
68
69@ifinfo
70Guile Reference Manual
71Copyright (C) 1996 Free Software Foundation @*
72Copyright (C) 1997 Free Software Foundation @*
73Copyright (C) 2000 Free Software Foundation @*
0624ce33
NJ
74Copyright (C) 2001 Free Software Foundation @*
75Copyright (C) 2002 Free Software Foundation
38a93523
NJ
76
77Permission is granted to make and distribute verbatim copies of
78this manual provided the copyright notice and this permission notice
79are preserved on all copies.
80
81@ignore
82Permission is granted to process this file through TeX and print the
83results, provided the printed document carries copying permission
84notice identical to this one except for the removal of this paragraph
85(this paragraph not being relevant to the printed manual).
86@end ignore
87
88Permission is granted to copy and distribute modified versions of this
89manual under the conditions for verbatim copying, provided that the entire
90resulting derived work is distributed under the terms of a permission
91notice identical to this one.
92
93Permission is granted to copy and distribute translations of this manual
94into another language, under the above conditions for modified versions,
95except that this permission notice may be stated in a translation approved
96by the Free Software Foundation.
97@end ifinfo
98
99@titlepage
100@sp 10
101@comment The title is printed in a large font.
102@title Guile Reference Manual
ce9d0562 103@subtitle Edition @value{MANUAL_EDITION}, for use with Guile @value{VERSION}
c936bede 104@subtitle $Id: guile.texi,v 1.19 2002-09-25 00:06:38 ossau Exp $
b45898ca
NJ
105
106@c AUTHORS
107
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.
112
113@c Significant portions were contributed by Gary Houston (contributions
85a9b4ed 114@c to POSIX system calls and networking, expect, I/O internals and
b45898ca
NJ
115@c extensions, slib installation, error handling) and Tim Pierce
116@c (sections on script interpreter triggers, alists, function tracing).
117
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.
121
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.
125
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.
131
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.
137
138@author Mark Galassi
139@author Cygnus Solution and Los Alamos National Laboratory
140@author @email{rosalia@@cygnus.com}
141@author
142@author Jim Blandy
143@author Free Software Foundation and MIT AI Lab
144@author @email{jimb@@red-bean.com}
145@author
146@author Gary Houston
147@author @email{ghouston@@arglist.com}
148@author
149@author Tim Pierce
150@author @email{twp@@skepsis.com}
151@author
152@author Neil Jerram
153@author @email{neil@@ossau.uklinux.net}
154@author
155@author Martin Grabmueller
156@author @email{mgrabmue@@cs.tu-berlin.de}
370babab 157
38a93523
NJ
158@c The following two commands start the copyright page.
159@page
160@vskip 0pt plus 1filll
161@vskip 0pt plus 1filll
162Copyright @copyright{} 1996 Free Software Foundation
163
164Copyright @copyright{} 1997 Free Software Foundation
165
166Copyright @copyright{} 2000 Free Software Foundation
167
0624ce33
NJ
168Copyright @copyright{} 2001 Free Software Foundation
169
170Copyright @copyright{} 2002 Free Software Foundation
171
38a93523
NJ
172Permission is granted to make and distribute verbatim copies of
173this manual provided the copyright notice and this permission notice
174are preserved on all copies.
175
176Permission is granted to copy and distribute modified versions of this
177manual under the conditions for verbatim copying, provided that the entire
178resulting derived work is distributed under the terms of a permission
179notice identical to this one.
180
181Permission is granted to copy and distribute translations of this manual
182into another language, under the above conditions for modified versions,
183except that this permission notice may be stated in a translation approved
184by Free Software Foundation.
185@end titlepage
186
187@c @smallbook
188@finalout
189@headings double
190
191@c Where to find Guile examples.
192@set example-dir doc/examples
193
801892e7 194@ifnottex
38a93523
NJ
195@node Top, Guile License, (dir), (dir)
196@top The Guile Reference Manual
197
198This reference manual documents Guile, GNU's Ubiquitous Intelligent
199Language for Extensions. It describes how to use Guile in many useful
200and interesting ways.
201
9401323e
NJ
202This Info file contains edition @value{MANUAL_EDITION} of the reference
203manual, corresponding to Guile version @value{VERSION}.
801892e7 204@end ifnottex
38a93523
NJ
205
206@menu
207Preface
208
209* Guile License:: Conditions for copying and using Guile.
210* Manual Layout:: How to read the rest of this manual.
370babab 211* Manual Conventions:: Conventional terminology.
38a93523
NJ
212
213Part I: Introduction to Guile
214
215* What is Guile?:: And what does it do?
73ede592 216* Whirlwind Tour:: An introductory whirlwind tour.
9401323e 217* Obtaining and Installing Guile::
38a93523
NJ
218* Reporting Bugs:: Reporting bugs in Guile or this manual.
219
ce9d0562 220Part II: Writing and Running Guile Scheme
38a93523 221
ce9d0562
NJ
222* Running Intro:: Introduction to this part.
223* Guile Scheme:: Guile's implementation of Scheme.
9401323e
NJ
224* Guile Scripting:: How to write Guile scripts.
225* Command Line Handling:: Command line options and arguments.
ce9d0562
NJ
226* Debugging Features:: Features for debugging errors.
227* Autoconf Support:: Guile-specific configure.in macros.
228* Miscellaneous Tools:: Snarfing, linting, etc.
229* Basic Ideas:: Basic ideas in Scheme.
230* Further Reading:: Where to find out more about Scheme.
231
232Part III: Guile as an Extension Language
233
234* Programming Intro:: Introduction to this part.
9401323e 235* Libguile Intro:: Using Guile as an extension language.
ce9d0562 236* Programming Overview:: An overview of Guile programming.
9401323e
NJ
237* Data Representation:: Data representation in Guile.
238* GH:: The deprecated GH interface.
9401323e 239
ce9d0562 240Part IV: Guile API Reference
9401323e
NJ
241
242* Reference Intro:: Introduction to the Guile API reference.
ce9d0562 243* API Overview:: Overview of the Guile API.
4c731ece
NJ
244* Simple Data Types:: Numbers, strings, booleans and so on.
245* Compound Data Types:: Data types for holding other data.
38a93523
NJ
246* Procedures and Macros:: Procedures and macros.
247* Utility Functions:: General utility functions.
248* Binding Constructs:: Definitions and variable bindings.
249* Control Mechanisms:: Controlling the flow of program execution.
250* Input and Output:: Ports, reading and writing.
251* Read/Load/Eval:: Reading and evaluating Scheme code.
252* Memory Management:: Memory management and garbage collection.
253* Objects:: Low level object orientation support.
254* Modules:: Designing reusable code libraries.
255* Scheduling:: Threads, mutexes, asyncs and dynamic roots.
c936bede 256* Options and Config:: Configuration, features and runtime options.
38a93523
NJ
257* Translation:: Support for translating other languages.
258* Debugging:: Internal debugging interface.
259* Deprecated:: Features that are planned to disappear.
38a93523 260
ce9d0562 261Part V: Guile Modules
38a93523
NJ
262
263* SLIB:: Using the SLIB Scheme library.
264* POSIX:: POSIX system calls and networking.
fc8529c7 265* SRFI Support:: Support for various SRFIs.
fc8529c7
MG
266* Readline Support:: Module for using the readline library.
267* Value History:: Maintaining a value history in the REPL.
c2537425
MG
268* Pretty Printing:: Nicely formatting Scheme objects for output.
269* Formatted Output:: The @code{format} procedure.
2a946b44 270* Rx Regexps:: The Rx regular expression library.
38a93523 271* Expect:: Controlling interactive programs with Guile.
a42b5e5b 272* The Scheme shell (scsh):: Using scsh interfaces in Guile.
38a93523
NJ
273
274Indices
275
276* Concept Index::
277* Procedure Index::
278* Variable Index::
279* Type Index::
255ea784 280* R5RS Index::
38a93523
NJ
281
282@end menu
283
284@include preface.texi
285
38a93523
NJ
286@iftex
287@page
288@unnumbered{Part I: Introduction to Guile}
289@end iftex
290
291@include intro.texi
292
38a93523 293@page
ce9d0562
NJ
294@node Running Intro
295@unnumbered Part II: Writing and Running Guile Scheme
9401323e 296
ce9d0562
NJ
297Guile's core language is Scheme, and an awful lot can be achieved simply
298by using Guile to write and run Scheme programs. In this part of the
299manual, we explain how to use Guile in this mode, and describe the tools
300that Guile provides to help you with script writing, debugging and
301packaging your programs for distribution.
38a93523 302
ce9d0562
NJ
303For readers who are not yet familiar with the Scheme language, this part
304includes a chapter that presents the basic concepts of the language, and
305gives references to freely available Scheme tutorial material on the
306web.
307
308For detailed reference information on the variables, functions etc. that
309make up Guile's application programming interface (API), please refer to
310Part IV (@pxref{Reference Intro,,Part IV --- Guile API Reference}).
9401323e 311
38a93523 312@include scheme-intro.texi
9401323e
NJ
313@include scripts.texi
314@include script-getopt.texi
9401323e 315@include debugging.texi
dc81cfeb 316@include autoconf.texi
73ede592 317@include tools.texi
ce9d0562 318@include scheme-ideas.texi
9401323e
NJ
319@include scheme-reading.texi
320
ce9d0562
NJ
321@page
322@node Programming Intro
323@unnumbered Part III: Guile as an Extension Language
324
325In this part of the manual, we aim to present a wide ranging picture of
326what it means to use Guile as an application extension language, to
327provide guidance, practical guidelines and tips for @emph{how} to
328program in Guile, and to document the tools that are available to help
329you with your programming. For detailed reference information on the
330variables, functions etc. that make up Guile's application programming
331interface (API), please refer to Part IV (@pxref{Reference Intro,,Part
332IV --- Guile API Reference}).
333
334@include extend.texi
335@include program.texi
336@include data-rep.texi
337@include gh.texi
338
9401323e
NJ
339@page
340@node Reference Intro
ce9d0562 341@unnumbered Part IV: Guile API Reference
9401323e 342
a7a7bb95
NJ
343Guile provides an application programming interface (@dfn{API}) to
344developers in two core languages: Scheme and C. This part of the manual
345contains reference documentation for all of the functionality that is
346available through both Scheme and C interfaces.
347
ce9d0562 348@include scm.texi
38a93523 349@include scheme-data.texi
4c731ece 350@include scheme-compound.texi
38a93523
NJ
351@include scheme-procedures.texi
352@include scheme-utility.texi
353@include scheme-binding.texi
354@include scheme-control.texi
355@include scheme-io.texi
356@include scheme-evaluation.texi
357@include scheme-memory.texi
358@include scheme-modules.texi
359@include scheme-scheduling.texi
360@c object orientation support here
361@include scheme-options.texi
362@include scheme-translation.texi
363@include scheme-debug.texi
364@include deprecated.texi
38a93523 365
38a93523
NJ
366@iftex
367@page
ce9d0562 368@unnumbered{Part V: Guile Modules}
38a93523
NJ
369@end iftex
370
371@include slib.texi
372@include posix.texi
fc8529c7 373@include srfi-modules.texi
fc8529c7 374@include repl-modules.texi
c2537425 375@include misc-modules.texi
38a93523
NJ
376@include expect.texi
377@include scsh.texi
38a93523 378
38a93523
NJ
379@iftex
380@page
381@unnumbered{Indices}
382@end iftex
383
384@include indices.texi
9401323e 385@include scheme-indices.texi
38a93523
NJ
386
387@contents
388
389@bye