[erlang-questions] Element Typing in Record Declarations?
Wed Feb 25 21:14:37 CET 2009
David Mercer wrote:
> Are there any plans to add bitstrings as a type? Currently, these have to
> be defined as any(), since binary() implies that bit_size is a multiple of
You should be able to write:
<<_:_*1>> for a bitstring or more generally:
<<_:M, _:_*N>> for a bitsring consisting of M+X*N bits where M, X and N
are non-negative integers.
>> -----Original Message-----
>> From: erlang-questions-bounces@REDACTED [mailto:erlang-questions-
>> bounces@REDACTED] On Behalf Of Kostis Sagonas
>> Sent: Tuesday, February 24, 2009 9:33 AM
>> To: erlang-questions@REDACTED
>> Subject: Re: [erlang-questions] Element Typing in Record Declarations?
>> David Mercer wrote:
>>> I just noticed in dict.erl:
>>> It appears that Erlang supports type declarations in record
>>> declarations, but I could not find this syntax in the Erlang reference
>>> documentation. Is there any documentation on this, and what effect it
>>> has on the system?
>> The documentation on this is currently an EEP:
>> This type information is used by Dialyzer to detect discrepancies
>> between the declared types of record fields and their actual uses.
>> erlang-questions mailing list
> erlang-questions mailing list
More information about the erlang-questions