typer(1)
π typer(1) β Erlang Module Definition π
okay bestie, pull up a chair, we're doing the TypEr page and it's literally iconic. this is the manual for typer(1), from the Erlang fam. π¦
β¨ NAME β¨
typer β Type annotator for Erlang programs π
πΈ DESCRIPTION πΈ
TypEr shows type information for Erlang modules. and like, not just shows it β it can also annotate the code of files with that type information. glow-up for your source files, no cap. β¨
π Using TypEr π
okay so here's the vibe: TypEr is used from the command-line. this section is the quick little rundown of the options, and β fun fact β you can get this exact same info by typing this into 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: the * means that multiple occurrences of that option are possible. so stack 'em up bestie, it's giving collector energy. π
Options:
-rβ search directories recursively for.erlfiles below them. lowkey important detail: if you're also giving a list of files, this option has to come after them. order matters, queen. π--showβ print type specifications for all functions onstdout. (this is actually the default behaviour, so this option is not really needed β it's just there being extra π)--show-exported(orshow_exported) β same as--show, but it only prints specs for the exported functions. the specs are displayed sorted alphabetically by the function's name. organized and pretty, we love that. πΈ--annotateβ annotate the specified files with type specifications. β¨--annotate-inc-filesβ same as--annotate, but it annotates all-include()files as well as all.erlfiles. (use this one with caution β it is not well-tested π)--annotate-in-placeβ annotate directly in the source code files themselves, instead of dumping the annotated files somewhere else. (also use with caution β not well-tested π)--edocβ print type information as Edoc@speccomments, not as type specs. different outfit, same energy. π--pltβ use the specified dialyzer PLT file instead of the default one.-T file*β the specified file(s) already contain type specifications, and those are to be trusted in order to print specs for the rest of the files. (you can specify multiple files or directories, separated by spaces.)-Dname(or-Dname=value) β pass the defined name(s) to TypEr. (**)-Iβ pass theinclude_dirto TypEr. (**)-pa dirβ includedirin the path for Erlang. this is useful when you're analyzing files that use-include_lib()directives or parse transforms. π§-pz dirβ includedirin the path for Erlang. this is useful when you're analyzing files that use-include_lib()directives or parse transforms. π§--version(or-v) β print the TypEr version plus some more information, then exit. bye bestie π
β οΈ NOTE: the**options-Dand-Iwork the same way as inerlc. π
and that's the whole page, you ate it πβ¨
this little baddie is brought to you by Ericsson AB and ships as part of dialyzer 6.0.2 β so when you're out here annotating Erlang like a main character, you know exactly whose name is on it. ππ
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms