typer

typer

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.

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 | --annotate-in-place]
      [-Ddefine]* [-I include_dir]* [-pa dir]* [-pz dir]*
      [-T application]* file* [-r directory*]
Note

* denotes that multiple occurrences of the option are possible.

Options:

Search directories recursively for .erl files below them. If a list of files is given, this must be after them.

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

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

Annotate the specified files with type specifications.

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

Annotate directly on the source code files, instead of dumping the annotated files in a different directory (use this option with caution - has not been tested much)

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

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

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

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

Pass the include_dir to TypEr. (**)

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

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

Print the TypEr version and some more information and exit.

Note

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