aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/doc/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-04-21 10:04:41 +0200
committerBjörn Gustavsson <[email protected]>2017-04-21 10:04:41 +0200
commitb80a70b1ca7ca73a6f1c0aece098e258a0c45595 (patch)
treefecd8dd74d0fcb57af5886dff50e620946da40cd /lib/dialyzer/doc/src
parent3f124994d35cbfc5158b89f91c16d4db6615d3fb (diff)
parent830b575e4d1260e7780a792ffdea81f028d86f9d (diff)
downloadotp-b80a70b1ca7ca73a6f1c0aece098e258a0c45595.tar.gz
otp-b80a70b1ca7ca73a6f1c0aece098e258a0c45595.tar.bz2
otp-b80a70b1ca7ca73a6f1c0aece098e258a0c45595.zip
Merge branch 'bjorn/dialyzer/add-typer/OTP-14336' into run-travis
* bjorn/dialyzer/add-typer/OTP-14336: Add smoke test for TypER Add back TypEr to the main OTP repository
Diffstat (limited to 'lib/dialyzer/doc/src')
-rw-r--r--lib/dialyzer/doc/src/Makefile2
-rw-r--r--lib/dialyzer/doc/src/ref_man.xml1
-rw-r--r--lib/dialyzer/doc/src/typer.xml157
3 files changed, 159 insertions, 1 deletions
diff --git a/lib/dialyzer/doc/src/Makefile b/lib/dialyzer/doc/src/Makefile
index 77d0a6fc68..8fe6cd30eb 100644
--- a/lib/dialyzer/doc/src/Makefile
+++ b/lib/dialyzer/doc/src/Makefile
@@ -34,7 +34,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
-XML_REF3_FILES = dialyzer.xml
+XML_REF3_FILES = dialyzer.xml typer.xml
XML_PART_FILES = part.xml part_notes.xml
XML_CHAPTER_FILES = dialyzer_chapter.xml notes.xml
diff --git a/lib/dialyzer/doc/src/ref_man.xml b/lib/dialyzer/doc/src/ref_man.xml
index ddac047f2e..d820fc5e00 100644
--- a/lib/dialyzer/doc/src/ref_man.xml
+++ b/lib/dialyzer/doc/src/ref_man.xml
@@ -31,5 +31,6 @@
<description>
</description>
<xi:include href="dialyzer.xml"/>
+ <xi:include href="typer.xml"/>
</application>
diff --git a/lib/dialyzer/doc/src/typer.xml b/lib/dialyzer/doc/src/typer.xml
new file mode 100644
index 0000000000..abd7f07ccf
--- /dev/null
+++ b/lib/dialyzer/doc/src/typer.xml
@@ -0,0 +1,157 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE erlref SYSTEM "erlref.dtd">
+
+<erlref>
+ <header>
+ <copyright>
+ <year>2006</year><year>2016</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+
+ </legalnotice>
+
+ <title>typer</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date>2017-04-13</date>
+ <rev></rev>
+ <file>type.xml</file>
+ </header>
+ <module>typer</module>
+ <modulesummary>Typer, a Type annotator for ERlang programs.
+ </modulesummary>
+ <description>
+ <p>TypEr shows type information for Erlang modules to the user.
+ Additionally, it can annotate the code of files with such type
+ information.</p>
+ </description>
+
+ <section>
+ <marker id="command_line"></marker>
+ <title>Using TypEr from the Command Line</title>
+ <p>TypEr is used from the command-line. This section provides a
+ brief description of the options. The same information can be
+ obtained by writing the following in a shell:</p>
+
+ <code type="none">
+typer --help</code>
+
+ <p><em>Usage:</em></p>
+
+ <code type="none">
+typer [--help] [--version] [--plt PLT] [--edoc]
+ [--show | --show-exported | --annotate | --annotate-inc-files]
+ [-Ddefine]* [-I include_dir]* [-pa dir]* [-pz dir]*
+ [-T application]* [-r] file*</code>
+
+ <note>
+ <p>* denotes that multiple occurrences of the option are possible.</p>
+ </note>
+
+ <p><em>Options:</em></p>
+
+ <taglist>
+
+ <tag><c>--r</c></tag>
+ <item>
+ <p>Search directories recursively for .erl files below them.</p>
+ </item>
+ <tag><c>--show</c></tag>
+ <item>
+ <p>Print type specifications for all functions on stdout.
+ (This is the default behaviour; this option is not really
+ needed.)</p>
+ </item>
+
+ <tag><c>--show-exported</c> (or <c>show_exported</c>)</tag>
+ <item>
+ <p>Same as <c>--show</c>, but print specifications for
+ exported functions only. Specs are displayed sorted
+ alphabetically on the function's name.</p>
+ </item>
+
+ <tag><c>--annotate</c></tag>
+ <item>
+ <p>Annotate the specified files with type specifications.</p>
+ </item>
+
+ <tag><c>--annotate-inc-files</c></tag>
+ <item>
+ <p>Same as <c>--annotate</c> but annotates all
+ <c>-include()</c> files as well as all .erl files. (Use this
+ option with caution - it has not been tested much).</p>
+ </item>
+
+ <tag><c>--edoc</c></tag>
+ <item>
+ <p>Print type information as Edoc <c>@spec</c> comments, not
+ as type specs.</p>
+ </item>
+
+ <tag><c>--plt</c></tag>
+ <item>
+ <p>Use the specified dialyzer PLT file rather than the default one.</p>
+ </item>
+
+ <tag><c>-T file*</c></tag>
+ <item>
+ <p>The specified file(s) already contain type specifications
+ and these are to be trusted in order to print specs for the
+ rest of the files. (Multiple files or dirs, separated by
+ spaces, can be specified.)</p>
+ </item>
+
+ <tag><c>-Dname</c> (or <c>-Dname=value</c>)</tag>
+ <item>
+ <p>Pass the defined name(s) to TypEr. (**)</p>
+ </item>
+
+ <tag><c>-I</c></tag>
+ <item>
+ <p>Pass the include_dir to TypEr. (**)</p>
+ </item>
+
+ <tag><c>-pa dir</c></tag>
+ <item>
+ <p>Include <c>dir</c> in the path for Erlang. This is useful
+ when analyzing files that have <c>-include_lib()</c>
+ directives or use parse transforms.</p>
+ </item>
+
+ <tag><c>-pz dir</c></tag>
+ <item>
+ <p>Include <c>dir</c> in the path for Erlang. This is useful
+ when analyzing files that have <c>-include_lib()</c>
+ directives or use parse transforms.</p>
+ </item>
+
+ <tag><c>--version</c> (or <c>-v</c>)</tag>
+ <item>
+ <p>Print the TypEr version and some more information and
+ exit.</p>
+ </item>
+
+ </taglist>
+
+ <note>
+ <p>** options <c>-D</c> and <c>-I</c> work both
+ from the command line and in the TypEr GUI; the syntax of
+ defines and includes is the same as that used by
+ <seealso marker="erts:erlc">erlc(1)</seealso>.</p>
+ </note>
+
+ </section>
+
+</erlref>