A Session with the Dialyzer

The first time you run the dialyzer you need to build a cache of all the types in the standard libraries that you intend to use. This is a once-only operation. If you launch the dialyzer, it tells you what to do.

 
$ ​dialyzer
 
Checking whether the PLT /Users/joe/.dialyzer_plt is up-to-date...
 
dialyzer: Could not find the PLT: /Users/joe/.dialyzer_plt
 
Use the options:
 
--build_plt to build a new PLT; or
 
--add_to_plt to add to an existing PLT
 
 
For example, use a command like the following:
 
dialyzer --build_plt --apps erts kernel stdlib mnesia
 
...

PLT is short for persistent lookup table. The PLT should contain a cache of all the types in the standard system. Building the PLT takes a few minutes. The first command ...

Get Programming Erlang, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.