@solka well, it's really tricky. Dialyzer is very ad hoc. I don't have any resources. I think I learned by reading some Uppsala paper on progressive typing with dialyzer and then by asking stuff in #erlang user mailing list. Gladly, these days, the Internet is full of high-quality answers to questions of beginners. I keep forgetting how to read some error messages, so I sometimes resort to looking the errors up.
@jonn
Thanks for the tips! I'll mess with it this week! I was scared away by the dialyzer errors. They are hard to read!;
@solka ask chatgpt to explain them 😃
@solka but if you ask me, ElixirLS plugin for VSCode provides nice suggestions. So does Co-pilot. Start by speccing some simple pure functions, then get familiar with unions and parametric types.
Just remember one thing: dialyzer can't go as deep as you like. Iirc, it parametrises 3-deep. Thus, list(list(list(atom))) is the same as list(list(list())) and is the same as list(list(list(boolean))). 4th level gets dropped. (Or 3rd! I don't remember).