[erlang-questions] User defined types: Floats
Juan Gamella Martín
Sun May 3 02:52:16 CEST 2015
I've noticed it's posible to define types specifying subsets of
integers, for example,
-type digits() :: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9.
However, it doesn't seem to apply to floats. For example,
-type my_floats() :: 1.0 | 2.0.
does not compile.
What are the reasons behind this? Am I making a mistake?
Thank you in advance,
More information about the erlang-questions