[erlang-questions] Getting typer to work for me

Kostis Sagonas kostis@REDACTED
Tue Dec 15 11:29:14 CET 2009


Torben Hoffmann wrote:
> On Tue, Dec 15, 2009 at 10:45, Kostis Sagonas <kostis@REDACTED> wrote:
>
>>  ...  BIG SNIP ....
>>
>> But typer will never return anything that differs from specs which are
>> already present in the file.  These are simply returned as is.
>>
>> Hope this explains things,
> 
> It does - I actually did all of the above while waiting for the answer from
> above. I see a use for typer, but I will more likely fall in love with
> dialyzer instead.

Indeed, dialyzer is the tool to fall in love with.

But typer also has a place in the Erlang tool chain.  Once you have 
properly dialyzed your application and it does not contain any remaining 
discrepancies, typer can help you add -spec annotations to your code. 
These specs will most likely need to be manually refined, but use of 
typer may save you lots of time in adding proper specs.  Not 
earthshaking, but it may help you improve your relationship with your 
real love as -type and -spec declarations typically allow dialyzer to 
detect more type errors.

See also a paper from dialyzer's homepage that advocates and documents 
the process we recommend to dialyzer users:

http://www.it.uu.se/research/group/hipe/dialyzer/publications/wrangler.pdf


Cheers,
Kostis


More information about the erlang-questions mailing list