aboutsummaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-03-18 16:14:54 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-04-01 11:21:21 +0200
commitacea637e9c0cbdb460419eaba505ca02283ecd02 (patch)
treed5670ece1647d0effa8150bf79314fb1c202f7df /system
parentf8bd9be45de37fa20bb82721c8ba2fc67b8a7cc9 (diff)
downloadotp-acea637e9c0cbdb460419eaba505ca02283ecd02.tar.gz
otp-acea637e9c0cbdb460419eaba505ca02283ecd02.tar.bz2
otp-acea637e9c0cbdb460419eaba505ca02283ecd02.zip
doc: Descripe Maps type syntax
Diffstat (limited to 'system')
-rw-r--r--system/doc/reference_manual/typespec.xml12
1 files changed, 12 insertions, 0 deletions
diff --git a/system/doc/reference_manual/typespec.xml b/system/doc/reference_manual/typespec.xml
index 71aec732cf..cc35c6eb21 100644
--- a/system/doc/reference_manual/typespec.xml
+++ b/system/doc/reference_manual/typespec.xml
@@ -100,6 +100,7 @@
| Fun
| Integer
| List
+ | Map
| Tuple
| Union
| UserDefined %% described in Section 6.3
@@ -126,10 +127,17 @@
| nonempty_improper_list(Type1, Type2) %% Type1 and Type2 as above
| nonempty_list(Type) %% Proper non-empty list
+ Map :: map() %% stands for a map of any size
+ | #{} %% stands for a map of any size
+ | #{PairList}
+
Tuple :: tuple() %% stands for a tuple of any size
| {}
| {TList}
+ PairList :: Type => Type
+ | Type => Type, PairList
+
TList :: Type
| Type, TList
@@ -275,6 +283,10 @@
Records have been extended to possibly contain type information.
This is described in the sub-section <seealso marker="#typeinrecords">"Type information in record declarations"</seealso> below.
</p>
+ <note>
+ <p>Map types, both <c>map()</c> and <c>#{ ... }</c>, are considered experimental during OTP 17.</p>
+ <p>No type information of maps pairs, only the containing map types, are used by Dialyzer in OTP 17.</p>
+ </note>
</section>
<section>