Help Dialyzer Help You!

1 · Brujo Benavides · June 18, 2019, 3:57 p.m.
…or Why you should use specs if you use opaque typesFollowing the steps from Devon and Stavros, I wanted to write this article to highlight a not so obvious dialyzer lesson about opaque types and specs…Help me help you — Jerry MaguireTL;DRFor the impatient ones…If you define an opaque type, you have to add specs to all the exported functions that use it (i.e. your module’s API).Opaque TypesSince this article is about opaque types, I will do a quick intro first…In Elixir, there are 3 ways to spec...