-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchicken.mdoc
281 lines (281 loc) · 8.37 KB
/
chicken.mdoc
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
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
.\" Copyright (c) 2007-2021, The CHICKEN Team
.\" All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
.\" modification, are permitted provided that the following conditions
.\" are met:
.\" 1. Redistributions of source code must retain the above copyright
.\" notice, this list of conditions and the following disclaimer.
.\" 2. Redistributions in binary form must reproduce the above copyright
.\" notice, this list of conditions and the following disclaimer in the
.\" documentation and/or other materials provided with the distribution.
.\" 3. The name of the authors may not be used to endorse or promote products
.\" derived from this software without specific prior written permission.
.\"
.\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR
.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
.\" IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY DIRECT, INDIRECT,
.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
.\"
.Dd Apr 26, 2017
.Dt CHICKEN 1
.Os
.Sh NAME
.Nm chicken
.Nd A Scheme-to-C translator
.Sh SYNOPSIS
.Nm
.Op Ar OPTION ...
.Op Ar FILENAME ...
.Sh DESCRIPTION
.Nm
is a compiler and interpreter for the programming language Scheme
supporting most of the features as described in the
Revised^5 Report on the Algorithmic Language Scheme.
The
.Nm
program is the basic Scheme-to-C translator used in this system.
For a more convenient interface, see
.Xr csc 1 .
.Pp
.Ar FILENAME
should be a complete source file name with extension, or
.Dq -
for standard input.
.Ar OPTION
may be one of the following:
.Pp
General options:
.Bl -tag -width Ds
.It Fl help
Display usage and exit.
.It Fl version
Display compiler version and exit.
.It Fl release
Print release number and exit.
.It Fl verbose
Display information on compilation progress.
.El
.Pp
File and pathname options:
.Bl -tag -width Ds
.It Fl output-file Ar FILENAME
Specifies output-filename, default is
.Dq out.c .
.It Fl include-path Ar PATHNAME
Specifies alternative path for included files.
.It Fl to-stdout
Write compiled file to stdout instead of file.
.El
.Pp
Language options:
.Bl -tag -width Ds
.It Fl feature Ar SYMBOL
Register feature identifier.
.It Fl no-feature Ar SYMBOL
Disable built-in feature identifier.
.El
.Pp
Syntax related options:
.Bl -tag -width Ds
.It Fl case-insensitive
Don't preserve case of read symbols.
.It Fl keyword-style Ar STYLE
Allow alternative keyword syntax
.Po prefix, suffix or none Pc .
.It Fl no-parentheses-synonyms
Disables list delimiter synonyms.
.It Fl no-symbol-escape
Disables support for escaped symbols.
.It Fl r5rs-syntax
Disables the CHICKEN extensions to R5RS syntax.
.It Fl compile-syntax
Macros are made available at run-time.
.It Fl emit-import-library Ar MODULE
Write compile-time module information into separate file.
.It Fl emit-all-import-libraries
Emit import-libraries for all defined modules.
.It Fl no-compiler-syntax
Disable expansion of compiler-macros.
.It Fl module Ar NAME
Wrap compiled code in module of the given name.
.It Fl module-registration
Always generate module registration code, even when import libraries are emitted.
.It Fl no-module-registration
Do not generate module registration code. Overrides
.Fl module-registration .
.El
.Pp
Translation options:
.Bl -tag -width Ds
.It Fl explicit-use
Do not use units
.Sq library
and
.Sq eval
by default.
.It Fl static
Link extensions statically.
.It Fl check-syntax
Stop compilation after macro-expansion.
.It Fl analyze-only
Stop compilation after first analysis pass.
.El
.Pp
Debugging options:
.Bl -tag -width Ds
.It Fl no-warnings
Disable warnings.
.It Fl debug-level Ar NUMBER
Set level of available debugging information.
.It Fl no-trace
Disable tracing information.
.It Fl profile
Executable emits profiling information.
.It Fl profile-name Ar FILENAME
Name of the generated profile information file.
.It Fl accumulate-profile
Executable emits profiling information in append mode.
.It Fl no-lambda-info
Omit additional procedure-information.
.It Fl types Ar FILENAME
Load additional type database.
.It Fl emit-types-file Ar FILENAME
Write type-declaration information into file.
.El
.Pp
Optimization options:
.Bl -tag -width Ds
.It Fl optimize-level Ar NUMBER
Enable certain sets of optimization options.
.It Fl optimize-leaf-routines
Enable leaf routine optimization.
.It Fl no-usual-integrations
Standard procedures may be redefined.
.It Fl unsafe
Disable all safety checks.
.It Fl local
Assume globals are only modified in current file.
.It Fl block
Enable block-compilation.
.It Fl disable-interrupts
Disable interrupts in compiled code.
.It Fl fixnum-arithmetic
Assume all numbers are fixnums.
.It Fl disable-stack-overflow-checks
Disables detection of stack-overflows.
.It Fl inline
Enable inlining.
.It Fl inline-limit Ar LIMIT
Set inlining threshold.
.It Fl inline-global
Enable cross-module inlining.
.It Fl specialize
Perform type-based specialization of primitive calls.
.It Fl emit-inline-file Ar FILENAME
Generate file with globally inlinable procedures
.Po implies Fl inline Fl local Pc .
.It Fl consult-inline-file Ar FILENAME
Explicitly load inline file.
.It Fl no-argc-checks
Disable argument count checks.
.It Fl no-bound-checks
Disable bound variable checks.
.It Fl no-procedure-checks
Disable procedure call checks.
.It Fl no-procedure-checks-for-usual-bindings
Disable procedure call checks only for usual bindings.
.It Fl no-procedure-checks-for-toplevel-bindings
Disable procedure call checks for toplevel bindings.
.It Fl strict-types
Assume variable do not change their type.
.It Fl clustering
Combine groups of local procedures into dispatch loop.
.It Fl lfa2
Perform additional lightweight flow-analysis pass.
.It Fl unroll-limit Ar LIMIT
Specifies inlining limit for self-recursive calls.
.El
.Pp
Configuration options:
.Bl -tag -width Ds
.It Fl unit Ar NAME
Compile file as a library unit.
.It Fl uses Ar NAME
Declare library unit as used.
.It Fl heap-size Ar NUMBER
Specifies heap-size of compiled executable.
.It Fl nursery Ar NUMBER Fl stack-size Ar NUMBER
Specifies nursery size of compiled executable.
.It Fl extend Ar FILENAME
Load file before compilation commences.
.It Fl prelude Ar EXPRESSION
Add expression to front of source file.
.It Fl postlude Ar EXPRESSION
Add expression to end of source file.
.It Fl prologue Ar FILENAME
Include file before main source file.
.It Fl epilogue Ar FILENAME
Include file after main source file.
.It Fl dynamic
Compile as dynamically loadable code.
.It Fl require-extension Ar NAME
Require and import extension
.Ar NAME .
.It Fl emit-link-file Ar FILENAME
Write a list of statically linked extensions to
.Ar FILENAME ,
used for identifying the static objects that need to be linked to an
executable.
.El
.Pp
Obscure options:
.Bl -tag -width Ds
.It Fl debug Ar MODES
Display debugging output for the given modes.
.It Fl raw
Do not generate implicit init- and exit code.
.It Fl emit-external-prototypes-first
Emit prototypes for callbacks before foreign declarations.
.It Fl regenerate-import-libraries
Always emit import libraries, even when their contents haven't changed.
The default behaviour is to preserve existing import libraries.
.It Fl ignore-repository
Do not refer to repository for extensions.
.It Fl setup-mode
Prefer the current directory when locating extensions.
.El
.Sh ENVIRONMENT
The following environment variables change the behaviour of
.Nm Ns :
.Bl -tag -width CHICKEN_INCLUDE_PATH
.It Ev CHICKEN_INCLUDE_PATH
Contains one or more pathnames where the compiler should additionally look for
include-files, separated by
.Sq \&;
characters.
.It Ev CHICKEN_OPTIONS
Holds a string of default compiler options that should apply to every invocation of
.Nm .
.El
.Sh EXIT STATUS
.Ex -std
.Sh SEE ALSO
.Xr chicken 1 ,
.Xr chicken-install 1 ,
.Xr chicken-uninstall 1
.Pp
More information can be found in the
.Lk http://wiki.call-cc.org/manual/index "CHICKEN User's Manual".
.Sh AUTHORS
.An The CHICKEN Team
.Sh BUGS
Submit bug reports by e-mail to