diff options
author | Magnus Lång <[email protected]> | 2016-02-27 17:56:22 +0100 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2016-04-28 16:14:24 +0200 |
commit | 252df5612032cfba71285b5886937e88ba176529 (patch) | |
tree | f44ae2d8b8259865111cc47807b18289e096235a /AUTHORS | |
parent | ac2f1c71d5b5169d49a5cd5fd73d28a702a58024 (diff) | |
download | otp-252df5612032cfba71285b5886937e88ba176529.tar.gz otp-252df5612032cfba71285b5886937e88ba176529.tar.bz2 otp-252df5612032cfba71285b5886937e88ba176529.zip |
erl_types: Add a map type representation
The type of a map is represented as a three-tuple {Pairs, DefaultKey,
DefaultValue}. DefaultKey and DefaultValue are types. Pairs is a list of
three-tuples {Key, mandatory | optional, Value}, where Key and Value are
types. All types Key must be singleton, or "known at compile time," as
the EEP put it. Examples:
#{integer()=>list()} {[], integer(), list()}
#{a=>char(), b=>atom()} {[{a, optional, char()},
{b, optional, atom()}],
none(), none()}
map() {[], any(), any()}
A more formal description of the representation and its invariants can
be found in erl_types.erl
Special thanks to Daniel S. McCain (@dsmccain) that co-authored a very
early version of this with me back in April 2014, although only the
singleton type logic remains from that version.
Diffstat (limited to 'AUTHORS')
0 files changed, 0 insertions, 0 deletions