diff options
Diffstat (limited to 'system/doc')
-rw-r--r-- | system/doc/efficiency_guide/commoncaveats.xml | 2 | ||||
-rw-r--r-- | system/doc/reference_manual/typespec.xml | 17 | ||||
-rw-r--r-- | system/doc/system_principles/system_principles.xml | 3 |
3 files changed, 12 insertions, 10 deletions
diff --git a/system/doc/efficiency_guide/commoncaveats.xml b/system/doc/efficiency_guide/commoncaveats.xml index 7b2128d888..7b00fa5d63 100644 --- a/system/doc/efficiency_guide/commoncaveats.xml +++ b/system/doc/efficiency_guide/commoncaveats.xml @@ -62,7 +62,7 @@ dangerous in a system that runs continuously. If only certain well-defined atoms are allowed as input, <seealso marker="erts:erlang#list_to_existing_atom/1">list_to_existing_atom/1</seealso> - can be used to + can be used to guard against a denial-of-service attack. (All atoms that are allowed must have been created earlier, for example, by simply using all of them in a module and loading that module.)</p> diff --git a/system/doc/reference_manual/typespec.xml b/system/doc/reference_manual/typespec.xml index 27cd0ba83d..f517259a64 100644 --- a/system/doc/reference_manual/typespec.xml +++ b/system/doc/reference_manual/typespec.xml @@ -4,7 +4,7 @@ <chapter> <header> <copyright> - <year>2003</year><year>2018</year> + <year>2003</year><year>2019</year> <holder>Ericsson AB. All Rights Reserved.</holder> </copyright> <legalnotice> @@ -140,8 +140,7 @@ | nonempty_improper_list(Type1, Type2) %% Type1 and Type2 as above | nonempty_list(Type) %% Proper non-empty list - Map :: map() %% denotes a map of any size - | #{} %% denotes the empty map + Map :: #{} %% denotes the empty map | #{AssociationList} Tuple :: tuple() %% denotes a tuple of any size @@ -192,17 +191,16 @@ <c>AssociationList</c> are allowed to overlap, and if they do, the leftmost association takes precedence. A map association has a key in <c>AssociationList</c> if it belongs to this type. - <c>AssociationList</c> can contain both mandatory and optional - association types. + <c>AssociationList</c> can contain both mandatory <c>(:=)</c> and + optional <c>(=>)</c> association types. If an association type is mandatory, an association with that type - is to be present. + needs to be present. In the case of an optional association type it is not required for the key type to be present. </p> <p> - Notice that the syntactic representation of <c>map()</c> is - <c>#{any() => any()}</c> (or <c>#{_ => _}</c>), not <c>#{}</c>. The notation <c>#{}</c> specifies the singleton type for the empty map. + Note that this notation is not a shorthand for the <c>map()</c> type. </p> <p> For convenience, the following types are also built-in. @@ -259,6 +257,9 @@ <cell><c>iolist()</c></cell><cell><c>maybe_improper_list(byte() | binary() | iolist(), binary() | [])</c></cell> </row> <row> + <cell><c>map()</c></cell><cell><c>#{any() => any()}</c></cell> + </row> + <row> <cell><c>function()</c></cell><cell><c>fun()</c></cell> </row> <row> diff --git a/system/doc/system_principles/system_principles.xml b/system/doc/system_principles/system_principles.xml index 500522d778..6986d93ed9 100644 --- a/system/doc/system_principles/system_principles.xml +++ b/system/doc/system_principles/system_principles.xml @@ -156,7 +156,8 @@ init:stop()</pre> command-line flag <c>-mode</c>.</p> <pre> % <input>erl -mode embedded</input></pre> - <p>Default mode is <c>interactive</c>.</p> + <p>Default mode is <c>interactive</c> and extra <c>-mode</c> flags are + ignored.</p> <p>The mode properties are as follows:</p> <list type="bulleted"> <item>In embedded mode, all code is loaded during system startup |