[erlang-questions] type declarations

Kostis Sagonas kostis@REDACTED
Wed Apr 22 09:00:47 CEST 2009

Howard Yeh wrote:
> Hi,
> I read the dialyzer on wrangler paper, and it looks really neat.


> I am trying to annotate my code with type declarations, but I am
> getting syntax errors.
> For the simple declaration,
> -spec test() -> 'ok'.
> I get,
> syntax error before: test
> Is there a flag i need to throw? I am using R12B.

If I am not mistaken, -spec works starting with R12B-5 (and most 
probably also in R12B-4) but not in earlier R12B versions.  In any case, 
I suggest you upgrade to the recently released R13B.  There are more 
reasons to do so besides -specs.


More information about the erlang-questions mailing list