[erlang-questions] How to define non_neg_float() type specification?
Fri Sep 28 08:47:21 CEST 2012
Thanks for suggestion!
From: [mailto:] On Behalf Of Stavros Aronis
Sent: Thursday, September 27, 2012 8:47 PM
Cc: Erlang-Questions Questions
Subject: Re: [erlang-questions] How to define non_neg_float() type specification?
Sorry, that was:
-type non_neg_float() :: float().
On Thursday, September 27, 2012 6:32:47 PM UTC+2, Stavros Aronis wrote:
Unfortunately Dialyzer does not support it (even constants are generalized to any float, typwise). Consequentially, the type language does tnot support it.
You can maybe try:
-type define non_neg_float() :: float().
This will help you documentation-wise and also (though in a somewhat limited way) Dialyzer-wise. If you use this type PropEr-wise however, you will get positive values, which you will need to filter...
On Thursday, September 27, 2012 6:10:14 PM UTC+2, Zhemzhitsky Sergey wrote:
Is it possible to define non_neg_float() type specification somehow?
The information contained in this message may be privileged and conf idential and protected from disclosure. If you are not the original intended recipient, you are hereby notified that any review, retransmission, dissemination, or other use of, or taking of any action in reliance upon, this information is prohibited. If you have received this communication in error, please notify the sender immediately by replying to this message and delete it from your computer. Thank you for your cooperation. Troika Dialog, Russia.
If you need assistance please contact our Contact Center (+7495) 258 0500 or go to www.troika.ru/eng/Contacts/system.wbp<http://www.troika.ru/eng/Contacts/system.wbp>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions