summaryrefslogtreecommitdiff
path: root/doc/man/man1/scalac.1
blob: fd4748b2b149d66cd3b6fbc01f8b0d3202a5b1e4 (plain) (blame)
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
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
.\" ##########################################################################
.\" #                      __                                                #
.\" #      ________ ___   / /  ___     Scala On-line Manual Pages            #
.\" #     / __/ __// _ | / /  / _ |    (c) 2002-2005, LAMP/EPFL              #
.\" #   __\ \/ /__/ __ |/ /__/ __ |                                          #
.\" #  /____/\___/_/ |_/____/_/ | |    http://scala.epfl.ch/                 #
.\" #                           |/                                           #
.\" ##########################################################################
.\"
.\" Process this file with nroff -man scalac.1
.\"
.TH scalac 1  "April 29, 2005" "version 0.1" "USER COMMANDS"
.\"
.\" ################################# NAME ###################################
.\"
.SH NAME
scalac \- Compiler for the Scala language
.\"
.\" ############################### SYNOPSIS #################################
.\"
.SH SYNOPSIS
\fBscalac\fR [ <\fIoptions\fR> ] <\fIsource files\fR>
.\"
.\" ############################### PARAMETERS ###############################
.\"
.SH PARAMETERS
.TP
<\fIoptions\fR>
Command line options. See \fBOPTIONS\fR below.
.TP
<\fIsource files\fR>
One or more source files to be compiled (such as MyClass.scala).
.\"
.\" ############################## DESCRIPTION ###############################
.\"
.SH DESCRIPTION
The \fBscalac\fR tool reads class and object definitions, written in the
Scala programming language, and compiles them into bytecode class files.
.PP
By default, the compiler puts each class file in the same directory as its
source file. You can specify a separate destination directory with -d (see
\fBOPTIONS\fR, below).
.\"
.\" ############################### OPTIONS ##################################
.\"
.SH OPTIONS
The compiler has a set of standard options that are supported on the current
development environment and will be supported in future releases.  An
additional set of non-standard options are specific to the current virtual
machine implementation and are subject to change in the future.  Non-standard
options begin with \fB-X\fR.
.SS Standard Options
.TP
\fB\-g\fR
Generate debugging info
.TP
\fB\-nowarn\fR
Generate no warnings
.TP
\fB\-verbose\fR
Output messages about what the compiler is doing
.TP
\fB\-classpath\fR <\fIpath\fR>
Specify where to find user class files (on Unix-based systems
a colon-separated list of paths, on Windows-based systems, a
semicolon-separate list of paths). This does not override the
built-in ("boot") search path.
.TP
\fB\-sourcepath\fR <\fIpath\fR>
Specify where to find input source files.
.TP
\fB\-bootclasspath\fR <\fIpath\fR>
Override location of bootstrap class files (where to find the
standard built-in classes, such as "scala.List").
.TP
\fB\-extdirs\fR <\fIdirs\fR>
Override location of installed extensions.
.TP
\fB\-d\fR <\fIdirectory\fR>
Specify where to place generated class files.
.TP
\fB\-encoding\fR <\fIencoding\fR>
Specify character encoding used by source files.
.TP
\fB\-separate:\fR<\fIseparate\fR>
Read symbol files for separate compilation: (\fIyes\fR, \fIno\fR).
.TP
\fB\-target:\fR<\fItarget\fR>
Specify which backend to use (\fIjvm\fR, \fImsil\fR).
.TP
\fB\-r\fR <\fIassembly files\fR>
CLR Assemblies referenced by the source program (only relevant with
option '-target:msil').
.TP
\fB\-o\fR <\fIassembly name\fR>
Name of the output assembly (only relevant with option '-target:msil').
.TP
\fB\-version\fR
Print product version and exit.
.TP
\fB\-? -help\fR
Print a synopsis of standard options.
.SS Non-Standard Options
.TP
\fB\-Xshortname\fR
Display short file names in error reports.
.TP
\fB\-Xmarkup\fR
No effect, only for compatibility.
.TP
\fB\-Xnewmatch\fR
New pattern matching.
.TP
\fB\-XpreserveWS\fR
Don't trim whitespace in XML literals.
.TP
\fB\-XrootClass\fR <\fIclass\fR>
Specify the root class of the global application.
.TP
\fB\-XappFile\fR <\fIfile\fR>
Specify the filename where to dump the whole-application inferred from the rootclass.
.TP
\fB\-XdotFile\fR <\fIfile\fR>
Specify the filename where to print the AST in graphviz dot format.
.TP
\fB\-Xrta\fR
Perform Rapid Type analysis for method call resolution.
.TP
\fB\-Xinline\fR
Inline method calls that can be resolved statically.
.TP
\fB\-Xrtt\fR
Enable run-time types.
.SS Debug Options
.TP
.B \-debug
Output debugging messages.
.TP
\fB\-explaintypes\fR
Explain type errors in more detail.
.TP
\fB\-uniqid\fR
Print identifiers with unique names.
.TP
\fB\-types\fR
Print tree types.
.TP
\fB\-prompt\fR
Display a prompt after each error.
.TP
\fB\-noimports\fR
Compile without any implicit imports.
.TP
\fB\-nopredefs\fR
Compile without any implicit predefined values.
.TP
\fB\-skip:\fR<\fIphases\fR>
Skip <\fIphases\fR> (see below).
.TP
\fB\-check:\fR<\fIphases\fR>
Check the tree after <\fIphases\fR> (see below).
.TP
\fB\-print:\fR<phases>
Print out program after <\fIphases\fR> (see below).
.TP
\fB\-printer:\fR<\fIprinter\fR>
Printer to use.
.TP
\fB\-print-file\fR <\fIfile\fR>
Specify file in which to print trees.
.TP
\fB\-graph:\fR<\fIphases\fR>
Graph the program after <\fIphases\fR> (see below).
.TP
\fB\-stop:\fR<\fIphases\fR>
Stop after first phase in <\fIphases\fR> (see below).
.TP
\fB\-log:\fR<\fIphases\fR>
Log operations in <\fIphases\fR> (see below).
.SS Compilation Phases
.TP
\fIinitial\fR
initializing compiler
.TP
\fIparse\fR
parse source files
.TP
\fInamer\fR
create symbols
.TP
\fIanalyze\fR
name and type analysis
.TP
\fIrefcheck\fR
reference checking
.TP
\fIuncurry\fR
uncurry function types and applications
.TP
\fItransmatch\fR
translate match expressions
.TP
\fIlambdalift\fR
lambda lifter
.TP
\fItypesasvalues\fR
represent types as values
.TP
\fIaddaccessors\fR
add accessors for constructor arguments
.TP
\fIexplicitouterclasses\fR
make links from inner classes to enclosing one explicit
.TP
\fIaddconstructors\fR
add explicit constructor for each class
.TP
\fItailcall\fR
add tail-calls
.TP
\fIwholeprog\fR
perform whole program analysis
.TP
\fIaddinterfaces\fR
add one interface per class
.TP
\fIexpandmixins\fR
expand mixins by code copying
.TP
\fIboxing\fR
makes boxing explicit
.TP
\fIerasure\fR
type eraser
.TP
\fIicode\fR
generate icode
.TP
\fIcodegen\fR
enable code generation
.TP
\fIterminal\fR
compilation terminated
.TP
\fIall\fR
matches all phases

.\"
.\" ############################### EXAMPLES #################################
.\"
.SH EXAMPLES
.TP
Compile a Scala program
\fBscalac\fR HelloWorld
.TP
Compile a Scala program to the destination directory \fBclasses\fR
\fBscalac\fR \-d classes HelloWorld.scala
.TP
Compile all Scala files found in the source directory \fBsrc\fR to the
destination directory \fBclasses\fR
\fBscalac\fR \-d classes src/*.scala 
.\"
.\" ############################# EXIT STATUS ################################
.\"
.SH "EXIT STATUS"
\fBscalac\fR returns a zero exist status if it succeeds to compile the
specified input files. Non zero is returned in case of failure.
.\"
.\" ############################## AUTHOR(S) #################################
.\"
.SH AUTHOR
Written by Stephane Micheloud.
.\"
.\" ################################ BUGS ####################################
.\"
.SH "REPORTING BUGS"
Report bugs to <scala@lists.epfl.ch>.
.\"
.\" ############################# COPYRIGHT ##################################
.\"
.SH COPYRIGHT
Copyright \(co 2002-2005 LAMP/EPFL
.PP
This is free software; see the distribution for copying conditions.  There is
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
.\"
.\" ############################## SEE ALSO ##################################
.\"
.SH "SEE ALSO"
.BR scala(1),
.BR scaladoc(1),
.BR scalaint(1),
.BR scalarun(1)
.\"
.\" ##########################################################################
.\" $Id$