From 030e6ef2efaad12d485cec1727c4b68c09c6c584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Gustavsson?= Date: Wed, 12 Apr 2017 15:19:23 +0200 Subject: Add back TypEr to the main OTP repository It turned out that the dependencies between Dialyzer and TypEr makes it impractical to have TypEr in a separate repository. Add it back to the OTP repository, but put the Erlang module 'typer' in the dialyzer application. --- lib/dialyzer/doc/src/Makefile | 2 +- lib/dialyzer/doc/src/ref_man.xml | 1 + lib/dialyzer/doc/src/typer.xml | 157 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 159 insertions(+), 1 deletion(-) create mode 100644 lib/dialyzer/doc/src/typer.xml (limited to 'lib/dialyzer/doc/src') 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 @@ + 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 @@ + + + + +
+ + 20062016 + Ericsson AB. All Rights Reserved. + + + 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. + + + + typer + + + 2017-04-13 + + type.xml +
+ typer + Typer, a Type annotator for ERlang programs. + + +

TypEr shows type information for Erlang modules to the user. + Additionally, it can annotate the code of files with such type + information.

+
+ +
+ + Using TypEr from the Command Line +

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:

+ + +typer --help + +

Usage:

+ + +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* + + +

* denotes that multiple occurrences of the option are possible.

+
+ +

Options:

+ + + + --r + +

Search directories recursively for .erl files below them.

+
+ --show + +

Print type specifications for all functions on stdout. + (This is the default behaviour; this option is not really + needed.)

+
+ + --show-exported (or show_exported) + +

Same as --show, but print specifications for + exported functions only. Specs are displayed sorted + alphabetically on the function's name.

+
+ + --annotate + +

Annotate the specified files with type specifications.

+
+ + --annotate-inc-files + +

Same as --annotate but annotates all + -include() files as well as all .erl files. (Use this + option with caution - it has not been tested much).

+
+ + --edoc + +

Print type information as Edoc @spec comments, not + as type specs.

+
+ + --plt + +

Use the specified dialyzer PLT file rather than the default one.

+
+ + -T file* + +

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.)

+
+ + -Dname (or -Dname=value) + +

Pass the defined name(s) to TypEr. (**)

+
+ + -I + +

Pass the include_dir to TypEr. (**)

+
+ + -pa dir + +

Include dir in the path for Erlang. This is useful + when analyzing files that have -include_lib() + directives or use parse transforms.

+
+ + -pz dir + +

Include dir in the path for Erlang. This is useful + when analyzing files that have -include_lib() + directives or use parse transforms.

+
+ + --version (or -v) + +

Print the TypEr version and some more information and + exit.

+
+ +
+ + +

** options -D and -I work both + from the command line and in the TypEr GUI; the syntax of + defines and includes is the same as that used by + erlc(1).

+
+ +
+ +
-- cgit v1.2.3