erlang-typer(1)

πŸ“¦ version 26.2.5.21, in fedora 43, fedora 44

✨ erlang-typer(1) ✨

okay so this is a User Commands manual page, and it's all about erlang-typer β€” bestie, come sit with me πŸ’–


🌸 NAME 🌸

erlang-typer β€” Typer, a Type annotator for Erlang programs. it literally does what it says on the tin, no cap πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

TypEr shows type information for Erlang modules to the user. that's the main character move right there πŸ’…

And on top of that? it can also annotate the code of files with such type information. so it doesn't just read the vibes, it writes them down too ✨


πŸ’œ USING TYPER FROM THE COMMAND LINE πŸ’œ

TypEr is used from the command-line, periodt. This section provides a brief description of the options. And the same information can be obtained by writing the following in a shell:

erlang-typer --help

🌈 Usage: 🌈

erlang-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. like, go off, stack 'em up πŸŽ€

⭐ Options: ⭐

  • -r β€” Search directories recursively for .erl files below them. If a list of files is given, this must be after them. (so, -r goes last, bestie, don't fight the order πŸ™ˆ)
  • --show β€” Print type specifications for all functions on stdout. (This is the default behaviour; this option is not really needed. it's giving decorative, honestly πŸ’€)
  • --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. so organized, so iconic 🌸
  • --annotate β€” Annotate the specified files with type specifications. it's out here editing your files for you, a real one 🫢
  • --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). ma'am, this one is lowkey unhinged, tread carefully πŸ’€
  • --annotate-in-place β€” 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). yes it edits your actual source files in place. yes that is scary. yes they said use caution 😭
  • --edoc β€” Print type information as Edoc @spec comments, not as type specs. aesthetic choice, respect it ✨
  • --plt β€” Use the specified dialyzer PLT file rather than the default one. your PLT, your rules πŸ‘‘
  • -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.) these are the certified sources, the ones we believe in fr fr πŸ’–
  • -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. very useful, very slay πŸ”₯
  • -pz dir β€” Include dir in the path for Erlang. This is useful when analyzing files that have -include_lib() directives or use parse transforms. (yes, same description as -pa β€” they're twins, i don't make the rules πŸ’…)
  • --version (or -v) β€” Print the TypEr version and some more information and exit. a little "hi, here's who i am" and then it dips πŸ‘‹
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). iykyk 🧚

and that's the whole page, bestie, no notes πŸ’œ

this lil masterpiece comes to you from Ericsson AB, and it's part of dialyzer 5.1.3.1 β€” so when you're out here annotating types and living your best life, just remember who made it possible. mwah πŸŽ€βœ¨

πŸ“¦ where this page comes from