summaryrefslogtreecommitdiff
path: root/doc/guile.1
blob: 7b3d23292ebb3727c30df5ed2d0679de4b5c21f6 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
.\" Written by Robert Merkel (rgmerk@mira.net)
.\" augmented by Rob Browning <rlb@cs.utexas.edu>
.\" Process this file with
.\" groff -man -Tascii foo.1
.\"
.\" title section date source manual
.TH GUILE 1 "2011-03-04" GNU "GNU Guile 2.2"
.
.SH NAME
guile \- The GNU Project Extension Language
.
.SH SYNOPSIS
.B guile
.RB [\| \-L
.IR DIRECTORY \|]
.RB [\| \-l
.IR FILE \|]
.RB [\| \-e
.IR FUNCTION \|]
.\".RI [\| \\\\ \|]
.RB [\| \e \|]
.RB [\| \-c
.IR EXPR \|]
.RB [\| \-s
.IR SCRIPT \|]
.RB [\| \-\- \|]
.RI [\| SCRIPT
.RI [\| ARGs\ for\ SCRIPT \|]\c
.RI ]

Only the most useful options are listed here;
see below for the remainder.
.
.SH DESCRIPTION
GNU Guile is an implementation of the Scheme programming language.
It extends the R5RS and R6RS language standards,
providing additional features necessary for real-world use.

Guile works well for interactive use,
basic scripting,
and extension of larger applications,
as well as for stand-alone Scheme application development.

The
.B guile
executable itself provides a stand-alone interactive compiler and
run-time for Scheme programs,
both for interactive use and for executing Scheme scripts or programs.

This manual page provides only brief instruction in invoking
.B guile
from the command line.
Please consult the Guile info documentation for more information,
(type \fB info "(guile)Invoking Guile"\fR at a command prompt).
.
.SH OPTIONS
.TP
.BI -L \ DIRECTORY
Add \fIDIRECTORY\fR to the front of Guile's module load path.
.
.TP
.BI -l \ FILE
Load Scheme source code from \fIFILE\fR.
.
.TP
.BI -e \ FUNCTION
After reading \fISCRIPT\fR, apply \fIFUNCTION\fR to command-line arguments.
Note that \fIFUNCTION\fR is evaluated,
so, for example,
.B (@ (my-module) my-proc)
is valid here.
.
.TP
.B \e
The "meta switch", used to work around limitations in #! scripts.
See "The Meta Switch" in the texinfo documentation for more details.
.
.TP
.B --
Stop argument processing, and start
.B guile
in interactive mode.
.
.TP
.BI -c \ EXPR
Stop argument processing,
and evaluate \fIEXPR\fR as a Scheme expression.
.
.TP
.BI -s \ SCRIPT-FILE
Load Scheme source from \fISCRIPT-FILE\fR and execute as a script.
Note that in many cases it is not necessary to use \fB-s\fR;
one may invoke
.B guile
simply as
.B guile
.I SCRIPT-FILE ARG...
.
.TP
.B -ds
Carry out \fB\-s \fISCRIPT\fR at this point in the option sequence.
Note that this argument must be used in conjunction with \fB\-s\fR.
.
.TP
.B --debug
Start
.B guile
with the debugging VM.
By default, debugging is on when
.B guile
is invoked interactively;
it is off otherwise.
.
.TP
.B --no-debug
Start
.B guile
without the debugging VM,
even if
.B guile
is being run interactively.
.
.TP
.B --auto-compile
Compile source files automatically (default behavior).
.
.TP
.B --no-auto-compile
Disable automatic source file compilation.
.
.TP
\fB\-\-listen\fR[=\fIP\fR]
Listen on a port or socket for remote REPL connections.
See the manual for more details.
.
.TP
\fB\-\-use\-srfi\fR=\fIN,M\fR...
Load SRFI extensions \fIN\fR, \fIM\fR, etc.
For example,
\fB \-\-use\-srfi\fR=\fI8,13\fR.
.
.TP
.BI -x \ EXTENSION
Add \fIEXTENSION\fR to the
.B guile
load extension list.
.
.TP
\fB\-h\fR, \fB\-\-help\fR
Describe command-line options and exit.
.
.TP
\fB\-v\fR, \fB\-\-version\fR
Display guile version and exit.
.
.TP
.B -q
In interactive mode,
suppress loading the user's initialization file,
.I ~/.guile.
.
.SH ENVIRONMENT
.\".TP \w'MANROFFSEQ\ \ 'u
.TP
.B GUILE_LOAD_PATH
If
.RB $ GUILE_LOAD_PATH
is set before
.B guile
is started,
its value is used to augment the path to search for Scheme files when
loading.
It should be a colon-separated list of directories,
which will be prefixed to the default
.B %load-path.
.TP
.B GUILE_LOAD_COMPILED_PATH
If
.RB $ GUILE_LOAD_COMPILED_PATH
is set before
.B guile
is started,
its value is used to augment the path to search for compiled
Scheme files (.go files) when loading.
It should be a colon-separated list of directories,
which will be prefixed to the default
.B %load-compiled-path.
.
.SH FILES
.TP
.I ~/.guile
A Guile script that is executed before any other processing occurs.
For example, the following
.I .guile
activates guile's readline interface:

.RS 9
.B (use-modules (ice-9 readline))
.RS 0
.B (activate-readline)
.
.SH "SEE ALSO"
The full documentation for Guile is maintained as a Texinfo manual.
If the
.B info
and
.B guile
programs are properly installed at your site,
the command
.IP
.B info guile
.PP
should give you access to the complete manual.

http://www.schemers.org provides a general introduction to the
Scheme language.
.
.SH "REPORTING BUGS"
There is a mailing list,
bug-guile@gnu.org,
for reporting Guile bugs and fixes.
But before reporting something as a bug,
please try to be sure that it really is a bug,
not a misunderstanding or a deliberate feature.
We ask you to read the section ``Reporting Bugs'' in the Guile reference
manual (or Info system) for hints on how and when to report bugs.
Also, include the version number of the Guile you are running in every bug
report that you send in.
Bugs tend actually to get fixed if they can be isolated,
so it is in your interest to report them in such a way that they can be
easily reproduced.
.
.SH COPYING
Copyright (C) 2010, 2011 Free Software Foundation, Inc.

Permission is granted to make and distribute verbatim copies of this
document provided the copyright notice and this permission notice are
preserved on all copies.

Permission is granted to copy and distribute modified versions of this
document under the conditions for verbatim copying,
provided that the entire resulting derived work is distributed under the
terms of a permission notice identical to this one.

Permission is granted to copy and distribute translations of this
document into another language,
under the above conditions for modified versions,
except that this permission notice may be stated in a
translation approved by the Free Software Foundation.
.
.SH AUTHORS
Robert Merkel <rgmerk@mira.net> wrote this manpage.
Rob Browning <rlb@cs.utexas.edu> has added to it.

.B guile
is GNU software.
Guile is originally based on Aubrey Jaffer's SCM interpreter,
and is the work of many individuals.