Chapter 30. Type Specifications and Dialyzer

This chapter focuses on Dialyzer, which is a very effective tool when it comes to analyzing Erlang code. It’s used to find all kinds of discrepancies, such as code that will never be executed, but its main use is to detect type errors in your Erlang code base. We’ll look at why Dialyzer was created, the guiding principles behind it, and its capabilities to find type-related errors. Of course, we’ll also work through a few examples of Dialyzer in use.

PLTs Are the Best Sandwiches

Our first step is to create Dialyzer’s persistent lookup table (PLT), which is a compilation of all the details Dialyzer can identify about the applications and modules that are part of your standard Erlang distribution, as well ...

Get Learn You Some Erlang for Great Good! now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.