[erlang-questions] Intel Quad CPUs

Serge Aleynikov saleyn@REDACTED
Thu Sep 6 12:25:56 CEST 2007


Kostis Sagonas wrote:
> To give you an idea, in edoc you currently write something of the form:
> 
> %% @spec (integer(), float()) -> atom()
> 
> to describe the types of a function foo.  In the new language you would 
> write (or preferably change the above edoc comment to be):
> 
> -spec(foo/2 :: ((integer(), float()) -> atom())).
> 

Would there be a way to specify concrete values (such as atoms 'ok' and 
'error' shown below) rather than types, similar to edoc style?

@spec () -> {ok, integer()} | {error, string()}

Serge



More information about the erlang-questions mailing list