[erlang-questions] Coming type checking in records :)
Mickaël Rémond
mickael.remond@REDACTED
Sat Nov 24 14:37:14 CET 2007
Hello,
It seems that type checking in Erlang record is coming soon :)
In Erlang R12B snapshot (file.hrl):
-type(date() :: {pos_integer(), pos_integer(), pos_integer()}).
-type(time() :: {non_neg_integer(), non_neg_integer(),
non_neg_integer()}).
-type(date_time() :: {date(), time()}).
%
%--------------------------------------------------------------------------
-record(file_info,
{size :: non_neg_integer(), % Size of file in bytes.
type :: 'device' | 'directory' | 'other' | 'regular' | 'symlink',
...
I guess the intend is to use this new information in dialyzer.
Anyway, it looks nice :)
--
Mickaël Rémond
http://www.process-one.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20071124/22dc75c1/attachment.htm>
More information about the erlang-questions
mailing list