1GOSH(1) Gauche Commands GOSH(1)
2
3
4
6 gosh - a Scheme script interpreter
7
9 gosh [-biqV] [-I path ] [-A path ] [-u module ] [-l file ] [-L file ]
10 [-e expr ] [-E expr ] [-m module ] [-f flag ] [-F feature ] [-p type ]
11 [-r standard ] [--] [ script argument ... ]
12
14 Gosh is a stand-alone Scheme interpreter built on top of the Gauche
15 Scheme script engine.
16
17 When script is given, gosh loads the script, evaluating Scheme code in
18 it. Then, if the script defines a procedure named main, gosh calls it
19 with a single argument which is a list of the script name and subse‐
20 quent arguments. When main returns an integer value, gosh exits with
21 it as an exit code. If main returns non-integer value, or an error is
22 signaled during evaluation, gosh exits with exit code 70 (EX_SOFTWARE).
23 See SRFI-22 (http://srfi.schemers.org/srfi-22/srfi-22.html) for
24 details. If there's no main procedure defined in the script, gosh
25 exits with code 0 after loading the script file.
26
27 If no script file is given, gosh goes into an interactive mode. By
28 default, gosh prompts the user to enter a Scheme expression, read and
29 evaluates it, then prints the result, until EOF is read. If the stan‐
30 dard input is not a terminal, however, gosh doesn't print a prompt; it
31 allows a user to use gosh as a filter program. This behavior can be
32 controlled by -i or -b option; see below.
33
34
36 Command line options are processed before loading the script file or
37 entering the interactive mode.
38
39 The options -I, -A, -u, -l, -L, -e and -E are processed in the order of
40 appearance. For example, adding a load path by -I option affects the
41 -l options after it, but not the ones before it.
42
43
44 -V Prints gosh version and exits.
45
46 -b Batch mode. Doesn't print prompt even the standard input is a
47 terminal. Supersedes -i.
48
49 -i Interactive mode. Forces to print prompt, even the standard input
50 is not a terminal.
51
52 -q Prevents reading the default initialization file.
53
54 -Ipath
55 Adds path in front of the load path list.
56
57 -Apath
58 Appends path to the tail of the load path list.
59
60 -umodule
61 Loads and imports module, as if "(use module )" is specified in
62 the code.
63
64 -lfile
65 Loads a Scheme file file.
66
67 -Lfile
68 Like -l, but doesn't complain if file doesn't exist.
69
70 -eexpr
71 Evaluates a Scheme expression expr.
72
73 -Eexpr
74 Same as -e, except that the expr is read as if it is surrounded by
75 parenthesis.
76
77 -ptype
78 Turns on the profiler. Type can be either 'time' or 'load'.
79
80 -mmodule
81 When the script file is given, this option specifies the name of
82 the module in which the "main" procedure is defined. The default
83 is "user".
84
85 -rstandard
86 Starts gosh with the default environment defined in RnRS, where n
87 is determined by standard. Currently, only 7 is the valid value
88 of standard.
89
90 -fflag
91 Sets various flags.
92 case-fold use case-insensitive reader (as in R5RS)
93 load-verbose report while loading files
94 include-verbose report while including files
95 no-inline don't inline primitive procedures and constants
96 (combined no-inline-globals, no-inline-locals,
97 and no-inline-constants.)
98 no-inline-globals don't inline global procedures.
99 no-inline-locals don't inline local procedures.
100 no-inline-constants don't inline constants.
101 no-post-inline-pass don't run post-inline optimization pass.
102 no-lambda-lifting-pass don't run lambda lifting optimization
103 pass.
104 no-source-info don't retain source information.
105 warn-legacy-syntax print warning when legacy Gauche syntax
106 is encountered.
107 test assume being run in the build tree; tries to
108 load files from the current build instead of
109 installation directories. Useful to test
110 the build without installation.
111
112 -Ffeature
113 Makes feature available in cond-expand forms.
114
115 -- Specifies that there are no more options. If there are more argu‐
116 ments after this, they are taken as script file name and its argu‐
117 ments.
118
119
121 GAUCHE_LOAD_PATH
122 A colon separated list of the load paths.
123 The paths are appended before the system default load paths.
124
125 GAUCHE_DYNLOAD_PATH
126 A colon separated list of the load paths for dynamically loaded
127 objects. The paths are appended before the system default load
128 paths.
129
130
132 Shiro Kawai (shiro @ acm . org)
133
134
136 gauche-config(1)
137
138 Gauche Scheme script engine:
139 http://practical-scheme.net/gauche/
140
141 For the information about Scheme language, see
142 http://www.schemers.org/
143
144
145
146
147Gauche 0.9.5 GOSH(1)