summaryrefslogtreecommitdiff
path: root/src/manual
diff options
context:
space:
mode:
authormichelou <michelou@epfl.ch>2011-09-25 17:06:54 +0000
committermichelou <michelou@epfl.ch>2011-09-25 17:06:54 +0000
commit5d5826812ae66b748342d86c5185e9bf7612fe7f (patch)
treed7d41146c5391c6963b50668d872ddb82b14d8e4 /src/manual
parent3e24f4c48d39681b948836f70f58a84f02fb76e2 (diff)
downloadscala-5d5826812ae66b748342d86c5185e9bf7612fe7f.tar.gz
scala-5d5826812ae66b748342d86c5185e9bf7612fe7f.tar.bz2
scala-5d5826812ae66b748342d86c5185e9bf7612fe7f.zip
updated man pages, fixed svn props, did some cl...
updated man pages, fixed svn props, did some cleanup
Diffstat (limited to 'src/manual')
-rw-r--r--src/manual/scala/man1/Command.scala12
-rw-r--r--src/manual/scala/man1/fsc.scala11
-rw-r--r--src/manual/scala/man1/sbaz.scala10
-rw-r--r--src/manual/scala/man1/scala.scala24
-rw-r--r--src/manual/scala/man1/scalac.scala226
-rw-r--r--src/manual/scala/man1/scaladoc.scala9
-rw-r--r--src/manual/scala/man1/scalap.scala8
7 files changed, 200 insertions, 100 deletions
diff --git a/src/manual/scala/man1/Command.scala b/src/manual/scala/man1/Command.scala
index 01b0750c01..16c4307140 100644
--- a/src/manual/scala/man1/Command.scala
+++ b/src/manual/scala/man1/Command.scala
@@ -5,6 +5,10 @@
package scala.man1
+/**
+ * @author Stephane Micheloud
+ * @version 1.0
+ */
trait Command {
import _root_.scala.tools.docutil.ManPage._
@@ -23,6 +27,9 @@ trait Command {
protected def CmdOption(opt: String): AbstractText =
Mono(Bold(NDash & opt) & " ")
+ protected def CmdOptionBound(opt: String, params: AbstractText) =
+ Mono(Bold(NDash & opt) & params & " ")
+
protected def CmdOptionLong(opt: String, params: AbstractText) =
Mono(Bold(NDash & NDash & opt) & " " & params & " ")
@@ -48,10 +55,5 @@ trait Command {
"Report bugs to " & Mono("https://issues.scala-lang.org/") & ".")
- //private val df = new java.text.SimpleDateFormat("MMM d, yyyy")
- //private val rightNow = new java.util.Date()
-
- def lastModified: String = "April 18, 2007" // df.format(rightNow)
-
def manpage: Document
}
diff --git a/src/manual/scala/man1/fsc.scala b/src/manual/scala/man1/fsc.scala
index 03ca391648..1f82cdf0ce 100644
--- a/src/manual/scala/man1/fsc.scala
+++ b/src/manual/scala/man1/fsc.scala
@@ -5,11 +5,14 @@
package scala.man1
+/**
+ * @author Lex Spoon
+ * @version 1.0
+ */
object fsc extends Command {
import _root_.scala.tools.docutil.ManPage._
protected def cn = new Error().getStackTrace()(0).getClassName()
- override def lastModified = "January 18, 2007"
val name = Section("NAME",
@@ -63,8 +66,8 @@ object fsc extends Command {
"is not needed. Note that the hostname must be for a host that shares " &
"the same filesystem."),
Definition(
- CmdOption("J", Argument("flag")),
- "Pass <flag> directly to the Java VM for the compilation daemon.")
+ CmdOptionBound("J", Argument("flag")),
+ "Pass " & Mono(Argument("flag")) & " directly to the Java VM for the compilation daemon.")
))
val example = Section("EXAMPLE",
@@ -146,7 +149,7 @@ object fsc extends Command {
def manpage = new Document {
title = command
- date = lastModified
+ date = "January 2007"
author = "Lex Spoon"
version = "0.4"
sections = List(
diff --git a/src/manual/scala/man1/sbaz.scala b/src/manual/scala/man1/sbaz.scala
index a9c65fa3f0..2e12330408 100644
--- a/src/manual/scala/man1/sbaz.scala
+++ b/src/manual/scala/man1/sbaz.scala
@@ -5,6 +5,10 @@
package scala.man1
+/**
+ * @author Stephane Micheloud
+ * @version 1.0
+ */
object sbaz extends Command {
import _root_.scala.tools.docutil.ManPage._
@@ -63,13 +67,13 @@ object sbaz extends Command {
"Display the version information"),
Definition(
- CmdOption("-univ") & Argument("name"),
+ CmdOptionLong("univ", Argument("name")),
"Operate on the named remote universe, selected from those " &
"in the local managed directory's universe. Affects "&
"the "&MBold("share")&" and "&MBold("retract")&" commands."),
Definition(
- CmdOption("-univ-url") & Argument("url"),
+ CmdOptionLong("univ-url", Argument("url")),
"Operate on the universe at the specified URL. Affects "&
"the "&MBold("share")&" and "&MBold("retract")&" commands."))),
@@ -186,7 +190,7 @@ object sbaz extends Command {
def manpage = new Document {
title = command
- date = "August 24, 2006"
+ date = "August 2006"
author = "Stephane Micheloud"
version = "0.3"
sections = List(
diff --git a/src/manual/scala/man1/scala.scala b/src/manual/scala/man1/scala.scala
index e1084e4852..368453f3a9 100644
--- a/src/manual/scala/man1/scala.scala
+++ b/src/manual/scala/man1/scala.scala
@@ -5,6 +5,10 @@
package scala.man1
+/**
+ * @author Stephane Micheloud
+ * @version 1.0
+ */
object scala extends Command {
import _root_.scala.tools.docutil.ManPage._
@@ -32,23 +36,23 @@ object scala extends Command {
Link(Bold("scalac") & "(1)", "scalac.html") & "."),
Definition(
- Mono("-howtorun:") & Argument("how"),
+ CmdOptionBound("howtorun:", Argument("how")),
"How to execute " & Argument("torun") & ", if it is present. " &
"Options for " & Argument("how") & " are " & Mono("guess") &
" (the default), " & Mono("script") & ", and " & Mono("object") &
"."),
Definition(
- Mono("-i"),
+ CmdOption("i"),
"Requests that a file be pre-loaded. It is only " &
"meaningful for interactive shells."),
Definition(
- Mono("-e"),
+ CmdOption("e"),
"Requests that its argument be executed as Scala code."),
Definition(
- Mono("-savecompiled"),
+ CmdOption("savecompiled"),
"Save this compiled version of scripts in order to speed up " &
"later executions of the same script. When running a script, " &
"save the compiled version of in a file with the same name as the " &
@@ -57,11 +61,11 @@ object scala extends Command {
"will be used if it is newer than the script file."),
Definition(
- Mono("-nocompdaemon"),
- "Do not use the " & Bold("fsc") & " offline compiler."),
+ CmdOption("nocompdaemon"),
+ "Do not use the " & MBold("fsc") & " offline compiler."),
Definition(
- Mono("-D") & Argument("property=value"),
+ CmdOptionBound("D", "property=value"),
"Set a Java system property. If no value is specified, " &
"then the property is set to the empty string."),
@@ -75,8 +79,8 @@ object scala extends Command {
val description = Section("DESCRIPTION",
- "The "&MBold(command)&" utility runs Scala code using a Java runtime "&
- "environment. The Scala code to run is " &
+ "The " & MBold(command) & " utility runs Scala code using a Java " &
+ "runtime environment. The Scala code to run is " &
"specified in one of three ways:",
NumberedList(
@@ -253,7 +257,7 @@ object scala extends Command {
def manpage = new Document {
title = command
- date = lastModified
+ date = "April 2007"
author = "Stephane Micheloud"
version = "0.5"
sections = List(
diff --git a/src/manual/scala/man1/scalac.scala b/src/manual/scala/man1/scalac.scala
index f305679881..b84510ee16 100644
--- a/src/manual/scala/man1/scalac.scala
+++ b/src/manual/scala/man1/scalac.scala
@@ -7,6 +7,7 @@ package scala.man1
/**
* @author Stephane Micheloud
+ * @version 1.0
*/
object scalac extends Command {
import _root_.scala.tools.docutil.ManPage._
@@ -51,41 +52,26 @@ object scalac extends Command {
"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 " & Bold("-X") & ".",
+ "in the future. Non-standard options begin with " & MBold("-X") & ".",
Section("Standard Options",
DefinitionList(
Definition(
- CmdOption("g:{none,source,line,vars,notc}"),
- SeqPara(
- Mono("\"none\"") & " generates no debugging info,",
- Mono("\"source\"") & " generates only the source file attribute,",
- Mono("\"line\"") & " generates source and line number information,",
- Mono("\"vars\"") & " generates source, line number and local " &
- "variable information,",
- Mono("\"notc\"") & " generates all of the above and " &
- Italic("will not") & " perform tail call optimization.")),
+ CmdOptionBound("D", "property=value"),
+ "Pass " & CmdOptionBound("D", "property=value") & " directly to the runtime system."),
Definition(
- CmdOption("nowarn"),
- "Generate no warnings"),
+ CmdOptionBound("J", Argument("flag")),
+ "Pass " & Mono(Argument("flag")) & " directly to the runtime system."),
Definition(
- CmdOption("verbose"),
- "Output messages about what the compiler is doing"),
+ CmdOptionBound("P:", Argument("plugin:opt")),
+ "Pass an option to a plugin"),
Definition(
- CmdOption("deprecation"),
- SeqPara(
- "Indicate whether source should be compiled with deprecation " &
- "information; defaults to " & Mono("off") & " (" &
- "accepted values are: " & Mono("on") & ", " & Mono("off") &
- ", " & Mono("yes") & " and " & Mono("no") & ")",
- "Available since Scala version 2.2.1")),
+ CmdOption("X"),
+ "Print a synopsis of advanced options."),
Definition(
- CmdOption("unchecked"),
- SeqPara(
- "Enable detailed unchecked warnings",
- "Non variable type-arguments in type patterns are unchecked " &
- "since they are eliminated by erasure",
- "Available since Scala version 2.3.0")),
+ CmdOption("bootclasspath", Argument("path")),
+ "Override location of bootstrap class files (where to find the " &
+ "standard built-in classes, such as \"" & Mono("scala.List") & "\")."),
Definition(
CmdOption("classpath", Argument("path")),
SeqPara(
@@ -99,19 +85,14 @@ object scalac extends Command {
"include the current directory in the search path, you must " &
"include " & Mono("\".\"") & " in the new settings.")),
Definition(
- CmdOption("sourcepath", Argument("path")),
- "Specify where to find input source files."),
- Definition(
- CmdOption("bootclasspath", Argument("path")),
- "Override location of bootstrap class files (where to find the " &
- "standard built-in classes, such as \"" & Mono("scala.List") & "\")."),
- Definition(
- CmdOption("extdirs", Argument("dirs")),
- "Override location of installed extensions."),
- Definition(
- CmdOption("d", Argument("directory")),
+ CmdOption("d", Argument("directory|jar")),
"Specify where to place generated class files."),
Definition(
+ CmdOption("deprecation"),
+ SeqPara(
+ "Emit warning and location for usages of deprecated APIs.",
+ "Available since Scala version 2.2.1")),
+ Definition(
CmdOption("encoding", Argument("encoding")),
SeqPara(
"Specify character encoding used by source files.",
@@ -122,77 +103,165 @@ object scalac extends Command {
MBold(" scala> ") &
Mono("new java.io.InputStreamReader(System.in).getEncoding"))),
Definition(
- CmdOption("target:", Argument("target")),
+ CmdOption("explaintypes"),
+ "Explain type errors in more detail."),
+ Definition(
+ CmdOption("extdirs", Argument("dirs")),
+ "Override location of installed extensions."),
+ Definition(
+ CmdOptionBound("g:", "{none,source,line,vars,notailcalls}"),
+ SeqPara(
+ Mono("\"none\"") & " generates no debugging info,",
+ Mono("\"source\"") & " generates only the source file attribute,",
+ Mono("\"line\"") & " generates source and line number information,",
+ Mono("\"vars\"") & " generates source, line number and local " &
+ "variable information,",
+ Mono("\"notailcalls\"") & " generates all of the above and " &
+ Italic("will not") & " perform tail call optimization.")),
+ Definition(
+ CmdOption("help"),
+ "Print a synopsis of standard options."),
+ Definition(
+ CmdOption("javabootclasspath", Argument("path")),
+ "Override Java boot classpath."),
+ Definition(
+ CmdOption("javaextdirs", Argument("path")),
+ "Override Java extdirs classpath."),
+ Definition(
+ CmdOption("no-specialization"),
+ "Ignore " & MItalic("@specialize") & " annotations."),
+ Definition(
+ CmdOption("nobootcp"),
+ "Do not use the boot classpath for the Scala jar files."),
+ Definition(
+ CmdOption("nowarn"),
+ "Generate no warnings"),
+ Definition(
+ CmdOption("optimise"),
+ "Generates faster bytecode by applying optimisations to the program."),
+ Definition(
+ CmdOption("print"),
+ "Print program with all Scala-specific features removed."),
+ Definition(
+ CmdOption("sourcepath", Argument("path")),
+ "Specify location(s) of source files."),
+ Definition(
+ CmdOptionBound("target:", Argument("target")),
SeqPara(
"Specify which backend to use (" & Mono("jvm-1.5," &
"msil") & ").",
"The default value is " & Mono("\"jvm-1.5\"") & " (was " &
Mono("\"jvm-1.4\"") & " up to Scala version 2.6.1).")),
Definition(
- CmdOption("print"),
- "Print program with all Scala-specific features removed"
- ),
- Definition(
- CmdOption("optimise"),
- "Generates faster bytecode by applying optimisations to the program"
- ),
+ CmdOption("toolcp", Argument("path")),
+ "Add to the runner classpath."),
Definition(
- CmdOption("explaintypes"),
- "Explain type errors in more detail."),
+ CmdOption("unchecked"),
+ SeqPara(
+ "Enable detailed unchecked (erasure) warnings",
+ "Non variable type-arguments in type patterns are unchecked " &
+ "since they are eliminated by erasure",
+ "Available since Scala version 2.3.0")),
Definition(
CmdOption("uniqid"),
- "Print identifiers with unique names (debugging option)."),
+ "Uniquely tag all identifiers in debugging output."),
+ Definition(
+ CmdOption("verbose"),
+ "Output messages about what the compiler is doing"),
Definition(
CmdOption("version"),
"Print product version and exit."),
Definition(
- /*CmdOption("?") & "| " &*/ CmdOption("help"),
- "Print a synopsis of standard options."))),
+ Mono(Bold("@") & Argument("file")),
+ "A text file containing compiler arguments (options and source files)")
+ )
+ ),
Section("Advanced Options",
DefinitionList(
Definition(
- CmdOption("Xassem", Argument("file")),
- "Name of the output assembly (only relevant with -target:msil)"),
+ CmdOption("Xassem-extdirs", Argument("dirs")),
+ "(Requires " & Mono("-target:msil") &
+ ") List of directories containing assemblies." &
+ " default:" & Mono("lib") & "."),
+ Definition(
+ CmdOption("Xassem-name", Argument("file")),
+ "(Requires " & Mono("-target:msil") &
+ ") Name of the output assembly."),
Definition(
CmdOption("Xassem-path", Argument("path")),
- "List of assemblies referenced by the program (only relevant with -target:msil)"),
+ "(Requires " & Mono("-target:msil") &
+ ") List of assemblies referenced by the program."),
Definition(
CmdOption("Xcheck-null"),
- "Emit warning on selection of nullable reference"),
+ "Warn upon selection of nullable reference"),
+ Definition(
+ CmdOption("Xcheckinit"),
+ "Wrap field accessors to throw an exception on uninitialized access."),
Definition(
CmdOption("Xdisable-assertions"),
"Generate no assertions and assumptions"),
Definition(
+ CmdOption("Xelide-below", Argument("n")),
+ "Calls to " & MItalic("@elidable") &
+ " methods are omitted if method priority is lower than argument."),
+ Definition(
CmdOption("Xexperimental"),
- "enable experimental extensions"),
+ "Enable experimental extensions"),
+ Definition(
+ CmdOption("Xfatal-warnings"),
+ "Fail the compilation if there are any warnings."),
+ Definition(
+ CmdOption("Xfuture"),
+ "Turn on future language features."),
+ Definition(
+ CmdOption("Xgenerate-phase-graph", Argument("file")),
+ "Generate the phase graphs (outputs .dot files) to fileX.dot."),
+ Definition(
+ CmdOption("Xlint"),
+ "Enable recommended additional warnings."),
+ Definition(
+ CmdOption("Xlog-implicits"),
+ "Show more detail on why some implicits are not applicable."),
+ Definition(
+ CmdOption("Xmax-classfile-name", Argument("n")),
+ "Maximum filename length for generated classes."),
+ Definition(
+ CmdOption("Xmigration"),
+ "Warn about constructs whose behavior may have changed between 2.7 and 2.8."),
+ Definition(
+ CmdOption("Xno-forwarders"),
+ "Do not generate static forwarders in mirror classes."),
Definition(
CmdOption("Xno-uescape"),
"Disable handling of " & BSlash & "u unicode escapes"),
Definition(
- CmdOption("Xplug-types"),
- "Parse but ignore annotations in more locations"),
+ CmdOption("Xnojline"),
+ "Do not use JLine for editing."),
Definition(
- CmdOption("Xplugin:", Argument("file")),
+ CmdOptionBound("Xplugin:", Argument("file")),
"Load a plugin from a file"),
Definition(
- CmdOption("Xplugin-disable:", Argument("plugin")),
+ CmdOptionBound("Xplugin-disable:", Argument("plugin")),
"Disable a plugin"),
Definition(
CmdOption("Xplugin-list"),
"Print a synopsis of loaded plugins"),
Definition(
- CmdOption("Xplugin-opt:", Argument("plugin:opt")),
- "Pass an option to a plugin"),
+ CmdOptionBound("Xplugin-require:", Argument("plugin")),
+ "Abort unless the given plugin(s) are available"),
Definition(
- CmdOption("Xplugin-require:", Argument("plugin")),
- "Abort unless a plugin is available"),
+ CmdOption("Xpluginsdir", Argument("path")),
+ "Path to search compiler plugins."),
Definition(
- CmdOption("Xprint:", Argument("phases")),
+ CmdOptionBound("Xprint:", Argument("phases")),
"Print out program after " & Argument("phases") & " (see below)."),
Definition(
+ CmdOption("Xprint-icode"),
+ "Log internal icode to *.icode files."),
+ Definition(
CmdOption("Xprint-pos"),
- "Print tree positions (as offsets)"),
+ "Print tree positions, as offsets."),
Definition(
CmdOption("Xprint-types"),
"Print tree types (debugging option)."),
@@ -204,11 +273,14 @@ object scalac extends Command {
"Compiler stays resident, files to compile are read from standard " &
"input."),
Definition(
+ CmdOption("Xscript", Argument("object")),
+ "Treat the source file as a script and wrap it in a main method."),
+ Definition(
CmdOption("Xshow-class", Argument("class")),
- "Show class info."),
+ "Show internal representation of class."),
Definition(
CmdOption("Xshow-object", Argument("object")),
- "Show object info."),
+ "Show internal representation of object."),
Definition(
CmdOption("Xshow-phases"),
"Print a synopsis of compiler phases."),
@@ -216,8 +288,15 @@ object scalac extends Command {
CmdOption("Xsource-reader", Argument("classname")),
"Specify a custom method for reading source files."),
Definition(
- CmdOption("Xscript", Argument("object")),
- "Compile as a script, wrapping the code into object.main().")
+ CmdOption("Xsourcedir", Argument("path")),
+ "(Requires " & Mono("-target:msil") &
+ ") Mirror source folder structure in output directory.."),
+ Definition(
+ CmdOption("Xverify"),
+ "Verify generic signatures in generated bytecode."),
+ Definition(
+ CmdOption("Y"),
+ "Print a synopsis of private options.")
)
),
@@ -352,13 +431,14 @@ object scalac extends Command {
def manpage = new Document {
title = command
- date = lastModified // e.g. "June 8, 2006"
- author = "Stephane Micheloud & LAMP"
- version = "0.4"
+ date = "September 2011"
+ author = "Stephane Micheloud"
+ version = "1.0"
sections = List(
name,
synopsis,
parameters,
+ description,
options,
environment,
examples,
diff --git a/src/manual/scala/man1/scaladoc.scala b/src/manual/scala/man1/scaladoc.scala
index 94530d2a20..a6832be4b0 100644
--- a/src/manual/scala/man1/scaladoc.scala
+++ b/src/manual/scala/man1/scaladoc.scala
@@ -1,11 +1,14 @@
/* NSC -- new Scala compiler
- * Copyright LAMP/EPFL
+ * Copyright 2005-2011 LAMP/EPFL
* @author Stephane Micheloud
- * @author Gilles Dubochet
*/
package scala.man1
+/**
+ * @author Gilles Dubochet
+ * @version 1.0
+ */
object scaladoc extends Command {
import _root_.scala.tools.docutil.ManPage._
@@ -141,7 +144,7 @@ object scaladoc extends Command {
def manpage = new Document {
title = command
- date = "2 June 2010"
+ date = "June 2010"
author = "Gilles Dubochet"
version = "2.0"
sections = List(
diff --git a/src/manual/scala/man1/scalap.scala b/src/manual/scala/man1/scalap.scala
index a77e49ce4e..cc9b312dac 100644
--- a/src/manual/scala/man1/scalap.scala
+++ b/src/manual/scala/man1/scalap.scala
@@ -5,6 +5,10 @@
package scala.man1
+/**
+ * @author Stephane Micheloud
+ * @version 1.0
+ */
object scalap extends Command {
import _root_.scala.tools.docutil.ManPage._
@@ -89,9 +93,9 @@ object scalap extends Command {
def manpage = new Document {
title = command
- date = "June 8, 2006"
+ date = "June 2006"
author = "Stephane Micheloud"
- version = "0.2"
+ version = "1.0"
sections = List(
name,
synopsis,