From de432f4ea9a8c29c931f30dd504662be1a01464d Mon Sep 17 00:00:00 2001 From: Hans Bolinder Date: Mon, 12 Oct 2015 14:28:39 +0200 Subject: [stdlib] Correct documentation Fix mistakes found by 'xmllint'. --- lib/stdlib/doc/src/array.xml | 4 +-- lib/stdlib/doc/src/assert_hrl.xml | 11 +++---- lib/stdlib/doc/src/beam_lib.xml | 4 +-- lib/stdlib/doc/src/binary.xml | 4 +-- lib/stdlib/doc/src/c.xml | 2 +- lib/stdlib/doc/src/calendar.xml | 4 +-- lib/stdlib/doc/src/dets.xml | 56 ++++++++++++++++++------------------ lib/stdlib/doc/src/digraph.xml | 6 ++-- lib/stdlib/doc/src/digraph_utils.xml | 5 ++-- lib/stdlib/doc/src/epp.xml | 2 +- lib/stdlib/doc/src/erl_anno.xml | 34 +++++++++++----------- lib/stdlib/doc/src/erl_parse.xml | 2 +- lib/stdlib/doc/src/erl_pp.xml | 4 +-- lib/stdlib/doc/src/erl_scan.xml | 36 +++++++++++------------ lib/stdlib/doc/src/erl_tar.xml | 3 +- lib/stdlib/doc/src/ets.xml | 13 +++++---- lib/stdlib/doc/src/file_sorter.xml | 52 ++++++++++++++++----------------- lib/stdlib/doc/src/gen_event.xml | 4 +-- lib/stdlib/doc/src/gen_fsm.xml | 2 +- lib/stdlib/doc/src/gen_server.xml | 2 +- lib/stdlib/doc/src/io.xml | 18 ++++++------ lib/stdlib/doc/src/lists.xml | 6 ++-- lib/stdlib/doc/src/math.xml | 2 +- lib/stdlib/doc/src/notes.xml | 53 +++++++++++++++++++--------------- lib/stdlib/doc/src/random.xml | 12 ++++++-- lib/stdlib/doc/src/re.xml | 16 +++++------ lib/stdlib/doc/src/sofs.xml | 5 ++-- lib/stdlib/doc/src/supervisor.xml | 2 +- lib/stdlib/doc/src/sys.xml | 4 +-- lib/stdlib/doc/src/timer.xml | 8 ------ lib/stdlib/doc/src/zip.xml | 2 +- 31 files changed, 192 insertions(+), 186 deletions(-) diff --git a/lib/stdlib/doc/src/array.xml b/lib/stdlib/doc/src/array.xml index 28b4435938..0f33e2621c 100644 --- a/lib/stdlib/doc/src/array.xml +++ b/lib/stdlib/doc/src/array.xml @@ -164,7 +164,7 @@ the default value cannot be confused with the values of set entries.

-

Equivalent to from_list(List, undefined).

+

Equivalent to from_list(List, undefined).

@@ -184,7 +184,7 @@ the default value cannot be confused with the values of set entries.

-

Equivalent to from_orddict(Orddict, undefined).

+

Equivalent to from_orddict(Orddict, undefined).

diff --git a/lib/stdlib/doc/src/assert_hrl.xml b/lib/stdlib/doc/src/assert_hrl.xml index b85be514d8..ef4f928e57 100644 --- a/lib/stdlib/doc/src/assert_hrl.xml +++ b/lib/stdlib/doc/src/assert_hrl.xml @@ -76,9 +76,6 @@ erlc -DNOASSERT=true *.erl -
-
-
Macros @@ -94,12 +91,12 @@ erlc -DNOASSERT=true *.erl assertMatch(GuardedPattern, Expr)

Tests that Expr completes normally yielding a value - that matches GuardedPattern. For example: + that matches GuardedPattern. For example:

- ?assertMatch({bork, _}, f())

-

Note that a guard when ... can be included: + ?assertMatch({bork, _}, f()) +

Note that a guard when ... can be included:

- ?assertMatch({bork, X} when X > 0, f())

+ ?assertMatch({bork, X} when X > 0, f())
assertNotMatch(GuardedPattern, Expr) diff --git a/lib/stdlib/doc/src/beam_lib.xml b/lib/stdlib/doc/src/beam_lib.xml index faf668735e..7c89c8b43e 100644 --- a/lib/stdlib/doc/src/beam_lib.xml +++ b/lib/stdlib/doc/src/beam_lib.xml @@ -4,7 +4,7 @@
- 20002013 + 20002015 Ericsson AB. All Rights Reserved. @@ -71,6 +71,7 @@ using strip/1, strip_files/1 and/or strip_release/1.

+
Reconstructing source code

Here is an example of how to reconstruct source code from @@ -152,7 +153,6 @@ keys.

- diff --git a/lib/stdlib/doc/src/binary.xml b/lib/stdlib/doc/src/binary.xml index 063f3048e0..2682198fe5 100644 --- a/lib/stdlib/doc/src/binary.xml +++ b/lib/stdlib/doc/src/binary.xml @@ -299,8 +299,8 @@
- Searches for the first match of a pattern in a binary +

Searches for the first occurrence of Pattern in Subject and @@ -353,8 +353,8 @@ - Searches for all matches of a pattern in a binary +

Works like match/2, but the Subject is searched until diff --git a/lib/stdlib/doc/src/c.xml b/lib/stdlib/doc/src/c.xml index a0f18bd899..e5238fa7db 100644 --- a/lib/stdlib/doc/src/c.xml +++ b/lib/stdlib/doc/src/c.xml @@ -121,12 +121,12 @@ compile:file(File, Options ++ [report_errors, report_w lc(Files) -> ok + Compile a list of files Files = [File] File = file:filename() - Compile a list of files

Compiles a list of files by calling compile:file(File, [report_errors, report_warnings]) for each File in Files.

diff --git a/lib/stdlib/doc/src/calendar.xml b/lib/stdlib/doc/src/calendar.xml index a8d933dc83..853184dc0f 100644 --- a/lib/stdlib/doc/src/calendar.xml +++ b/lib/stdlib/doc/src/calendar.xml @@ -130,11 +130,11 @@ + Compute the number of days from year 0 up to the given date - Compute the number of days from year 0 up to the given date

This function computes the number of gregorian days starting with year 0 and ending at the given date.

@@ -347,11 +347,11 @@ + Check if a date is valid - Check if a date is valid

This function checks if a date is a valid.

diff --git a/lib/stdlib/doc/src/dets.xml b/lib/stdlib/doc/src/dets.xml index 14237b6f90..a0d3f95b6a 100644 --- a/lib/stdlib/doc/src/dets.xml +++ b/lib/stdlib/doc/src/dets.xml @@ -316,20 +316,20 @@ bytes.

-

{filename, file:name()}, +

{filename, file:name()}, the name of the file where objects are stored.

-

{keypos, keypos()} - , the position of the key.

+

{keypos, keypos() + }, the position of the key.

{size, integer() >= 0}, the number of objects stored in the table.

-

{type, type()}, - the type of the table.

+

{type, type() + }, the type of the table.

@@ -345,12 +345,12 @@ allowed:

-

{access, access()} - , the access mode.

+

{access, access() + }, the access mode.

-

{auto_save, - auto_save()}, the auto save interval.

+

{auto_save, + auto_save()}, the auto save interval.

{bchunk_format, binary()}, an opaque binary @@ -730,16 +730,16 @@ ok tuples where the following values are allowed:

-

{access, - access()}. It is possible to open +

{access, + access()}. It is possible to open existing tables in read-only mode. A table which is opened in read-only mode is not subjected to the automatic file reparation algorithm if it is later opened after a crash. The default value is read_write.

-

{auto_save, - auto_save()}, the auto save +

{auto_save, + auto_save()}, the auto save interval. If the interval is an integer Time, the table is flushed to disk whenever it is not accessed for Time milliseconds. A table that has been flushed @@ -749,18 +749,18 @@ ok is 180000 (3 minutes).

-

{estimated_no_objects, - no_slots()}. Equivalent to the +

{estimated_no_objects, + no_slots()}. Equivalent to the min_no_slots option.

-

{file, - file:name()}, the name of the file to be +

{file, + file:name()}, the name of the file to be opened. The default value is the name of the table.

-

{max_no_slots, - no_slots()}, the maximum number +

{max_no_slots, + no_slots()}, the maximum number of slots that will be used. The default value as well as the maximal value is 32 M. Note that a higher value may increase the fragmentation of the table, and conversely, @@ -769,16 +769,16 @@ ok 9 tables.

-

{min_no_slots, - no_slots()}. Application +

{min_no_slots, + no_slots()}. Application performance can be enhanced with this flag by specifying, when the table is created, the estimated number of different keys that will be stored in the table. The default value as well as the minimum value is 256.

-

{keypos, - keypos()}, the position of the +

{keypos, + keypos()}, the position of the element of each object to be used as key. The default value is 1. The ability to explicitly state the key position is most convenient when we want to store Erlang @@ -815,12 +815,12 @@ ok already open.

-

{type, type()}, +

{type, type()}, the type of the table. The default value is set.

-

{version, - version()}, the version of the format +

{version, + version()}, the version of the format used for the table. The default value is 9. Tables on the format used before OTP R8 can be created by giving the value 8. A version 8 table can be converted to @@ -1036,8 +1036,8 @@ ok specification that matches all objects.

-

{select, - match_spec()}. As for select +

{select, + match_spec()}. As for select the table is traversed by calling dets:select/3 and dets:select/1. The difference is that the match specification is explicitly given. This is how to diff --git a/lib/stdlib/doc/src/digraph.xml b/lib/stdlib/doc/src/digraph.xml index 49dc68e103..291be6c08b 100644 --- a/lib/stdlib/doc/src/digraph.xml +++ b/lib/stdlib/doc/src/digraph.xml @@ -103,13 +103,15 @@

A digraph as returned by new/0,1.

- edge() + edge() +

- vertex() + vertex() +

diff --git a/lib/stdlib/doc/src/digraph_utils.xml b/lib/stdlib/doc/src/digraph_utils.xml index 6a4db2e963..639069543c 100644 --- a/lib/stdlib/doc/src/digraph_utils.xml +++ b/lib/stdlib/doc/src/digraph_utils.xml @@ -122,8 +122,9 @@ - digraph() -

A digraph as returned by digraph:new/0,1.

+ digraph() +

+ A digraph as returned by digraph:new/0,1.

diff --git a/lib/stdlib/doc/src/epp.xml b/lib/stdlib/doc/src/epp.xml index fe2944bbf7..8c901f57ec 100644 --- a/lib/stdlib/doc/src/epp.xml +++ b/lib/stdlib/doc/src/epp.xml @@ -39,7 +39,7 @@ by compile to preprocess macros and include files before the actual parsing takes place.

The Erlang source file encoding is selected by a + id="encoding"/>encoding is selected by a comment in one of the first two lines of the source file. The first string that matches the regular expression coding\s*[:=]\s*([-a-zA-Z0-9])+ selects the encoding. If diff --git a/lib/stdlib/doc/src/erl_anno.xml b/lib/stdlib/doc/src/erl_anno.xml index be0ffe6f4d..ddc8b8c765 100644 --- a/lib/stdlib/doc/src/erl_anno.xml +++ b/lib/stdlib/doc/src/erl_anno.xml @@ -44,7 +44,7 @@

This module implements an abstract type that is used by the Erlang Compiler and its helper modules for holding data such as column, line number, and text. The data type is a collection of - annotations as + annotations as described in the following.

The Erlang Token Scanner returns tokens with a subset of the following annotations, depending on the options:

@@ -102,8 +102,8 @@ - anno() -

A collection of annotations.

+ anno() +

A collection of annotations.

@@ -133,8 +133,8 @@ - Return the column +

Returns the column of the annotations Anno.

@@ -142,8 +142,8 @@
- Return the end location of the text +

Returns the end location of the text of the annotations Anno. If there is no text, @@ -153,8 +153,8 @@ - Return the filename +

Returns the filename of the annotations Anno. If there is no filename, undefined is returned. @@ -180,8 +180,8 @@ - Return the generated Boolean +

Returns true if the annotations Anno has been marked as generated. The default is to return @@ -199,8 +199,8 @@ - Return the line +

Returns the line of the annotations Anno.

@@ -208,8 +208,8 @@
- Return the location +

Returns the location of the annotations Anno.

@@ -217,16 +217,16 @@
- Create a new collection of annotations +

Creates a new collection of annotations given a location.

- Modify the filename +

Modifies the filename of the annotations Anno.

@@ -234,8 +234,8 @@
- Modify the generated marker +

Modifies the generated marker of the annotations Anno. @@ -244,8 +244,8 @@ - Modify the line +

Modifies the line of the annotations Anno.

@@ -253,8 +253,8 @@
- Modify the location +

Modifies the location of the annotations Anno.

@@ -262,8 +262,8 @@
- Modify the record marker +

Modifies the record marker of the annotations Anno.

@@ -271,8 +271,8 @@
- Modify the text +

Modifies the text of the annotations Anno.

@@ -280,8 +280,8 @@
- Return the text +

Returns the text of the annotations Anno. If there is no text, undefined is returned. diff --git a/lib/stdlib/doc/src/erl_parse.xml b/lib/stdlib/doc/src/erl_parse.xml index fdd776b7f1..0938b5dec3 100644 --- a/lib/stdlib/doc/src/erl_parse.xml +++ b/lib/stdlib/doc/src/erl_parse.xml @@ -174,8 +174,8 @@ - Convert an Erlang term into an abstract form +

Converts the Erlang data structure Data into an abstract form of type AbsTerm.

diff --git a/lib/stdlib/doc/src/erl_pp.xml b/lib/stdlib/doc/src/erl_pp.xml index c9d9e2723d..4b8a571c81 100644 --- a/lib/stdlib/doc/src/erl_pp.xml +++ b/lib/stdlib/doc/src/erl_pp.xml @@ -48,8 +48,8 @@ -

The optional argument - HookFunction, shown in the functions described below, +

The optional argument + HookFunction, shown in the functions described below, defines a function which is called when an unknown form occurs where there should be a valid expression.

diff --git a/lib/stdlib/doc/src/erl_scan.xml b/lib/stdlib/doc/src/erl_scan.xml index 18e988e286..342f491dd0 100644 --- a/lib/stdlib/doc/src/erl_scan.xml +++ b/lib/stdlib/doc/src/erl_scan.xml @@ -181,10 +181,10 @@ + Re-entrant scanner An opaque continuation - Re-entrant scanner

This is the re-entrant scanner which scans characters until a dot ('.' followed by a white space) or @@ -324,9 +324,9 @@ + Return information about a token - Return information about a token

Returns a list containing information about the token Token. If one single @@ -345,28 +345,28 @@

The following TokenInfoTuples with corresponding TokenItems are valid:

- {category, - category()} + {category, + category()}

The category of the token.

- {column, - column()} + {column, + column()}

The column where the token begins.

{length, integer() > 0}

The length of the token's text.

- {line, - line()} + {line, + line()}

The line where the token begins.

- {location, - location()} + {location, + location()}

The line and column where the token begins, or just the line if the column unknown.

- {symbol, - symbol()} + {symbol, + symbol()}

The token's symbol.

{text, string()} @@ -416,19 +416,19 @@

The following AttributeInfoTuples with corresponding AttributeItems are valid:

- {column, - column()} + {column, + column()}

The column where the token begins.

{length, integer() > 0}

The length of the token's text.

- {line, - line()} + {line, + line()}

The line where the token begins.

- {location, - location()} + {location, + location()}

The line and column where the token begins, or just the line if the column unknown.

diff --git a/lib/stdlib/doc/src/erl_tar.xml b/lib/stdlib/doc/src/erl_tar.xml index 0fa5a55c5b..898b55df72 100644 --- a/lib/stdlib/doc/src/erl_tar.xml +++ b/lib/stdlib/doc/src/erl_tar.xml @@ -442,7 +442,7 @@ structure like a file descriptor, a sftp channel id or such. The different Fun clauses operates on that very term.

-

The fun clauses parameter lists are: +

The fun clauses parameter lists are:

(write, {UserPrivate,DataToWrite}) Write the term DataToWrite using UserPrivate @@ -457,7 +457,6 @@ -

A complete Fun parameter for reading and writing on files using the file module could be:

diff --git a/lib/stdlib/doc/src/ets.xml b/lib/stdlib/doc/src/ets.xml index ee2bf96cb7..7b01109ff8 100644 --- a/lib/stdlib/doc/src/ets.xml +++ b/lib/stdlib/doc/src/ets.xml @@ -132,9 +132,10 @@
- continuation() + continuation() -

Opaque continuation used by +

+ Opaque continuation used by select/1,3, select_reverse/1,3, @@ -448,13 +449,13 @@ Error: fun containing local Erlang function calls {owner, pid()}

The pid of the owner of the table.
- {protection, access()}

+ {protection, access()}

The table access rights.
{size, integer() >= 0

The number of objects inserted in the table.
- {type, type()}

+ {type, type()}

The table type.
{read_concurrency, boolean()}

@@ -1626,6 +1627,7 @@ true + Update a counter object in an ETS table. @@ -1633,7 +1635,6 @@ true - Update a counter object in an ETS table.

This function provides an efficient way to update one or more counters, without the hassle of having to look up an object, update @@ -1700,11 +1701,11 @@ true + Updates the Pos:th element of the object with a given key in an ETS table. - Updates the Pos:th element of the object with a given key in an ETS table.

This function provides an efficient way to update one or more elements within an object, without the hassle of having to look up, diff --git a/lib/stdlib/doc/src/file_sorter.xml b/lib/stdlib/doc/src/file_sorter.xml index 30e09c17b0..f033eebec7 100644 --- a/lib/stdlib/doc/src/file_sorter.xml +++ b/lib/stdlib/doc/src/file_sorter.xml @@ -223,82 +223,82 @@ output(L) -> -
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/lib/stdlib/doc/src/gen_event.xml b/lib/stdlib/doc/src/gen_event.xml index 1efac1535a..c4bab45781 100644 --- a/lib/stdlib/doc/src/gen_event.xml +++ b/lib/stdlib/doc/src/gen_event.xml @@ -716,7 +716,7 @@ gen_event:stop -----> Module:terminate/2 the purposes described below.

This function is called by a gen_event process when:

- + One of sys:get_status/1,2 is invoked to get the gen_event status. Opt is set @@ -740,7 +740,7 @@ gen_event:stop -----> Module:terminate/2 customises the details of the current state of the event handler. Any term is allowed for Status. The gen_event module uses Status as follows:

- + When sys:get_status/1,2 is called, gen_event ensures that its return value contains Status in place of the event handler's actual state term. diff --git a/lib/stdlib/doc/src/gen_fsm.xml b/lib/stdlib/doc/src/gen_fsm.xml index a8d7fadeb4..4d594b8eb2 100644 --- a/lib/stdlib/doc/src/gen_fsm.xml +++ b/lib/stdlib/doc/src/gen_fsm.xml @@ -805,7 +805,7 @@ gen_fsm:sync_send_all_state_event -----> Module:handle_sync_event/4 module state data.

This function is called by a gen_fsm process when:

- + One of sys:get_status/1,2 is invoked to get the gen_fsm status. Opt is set to diff --git a/lib/stdlib/doc/src/gen_server.xml b/lib/stdlib/doc/src/gen_server.xml index c31e869db8..6d04771cd4 100644 --- a/lib/stdlib/doc/src/gen_server.xml +++ b/lib/stdlib/doc/src/gen_server.xml @@ -673,7 +673,7 @@ gen_server:abcast -----> Module:handle_cast/2 module state.

This function is called by a gen_server process when:

- + One of sys:get_status/1,2 is invoked to get the gen_server status. Opt is set diff --git a/lib/stdlib/doc/src/io.xml b/lib/stdlib/doc/src/io.xml index edf3c51b4c..4655c8662f 100644 --- a/lib/stdlib/doc/src/io.xml +++ b/lib/stdlib/doc/src/io.xml @@ -132,8 +132,8 @@ - Read a specified number of characters +

Reads Count characters from standard input (IoDevice), prompting it with Prompt. It @@ -162,8 +162,8 @@ - Read a line +

Reads a line from the standard input (IoDevice), prompting it with Prompt. It returns:

@@ -300,8 +300,8 @@ - Read a term +

Reads a term Term from the standard input (IoDevice), prompting it with Prompt. It @@ -330,8 +330,8 @@ - Read a term +

Reads a term Term from IoDevice, prompting it with Prompt. Reading starts at location @@ -698,8 +698,8 @@ ok - Read formatted input +

Reads characters from the standard input (IoDevice), prompting it with Prompt. Interprets the characters in @@ -870,8 +870,8 @@ enter>: alan : joe - Read and tokenize Erlang expressions +

Reads data from the standard input (IoDevice), prompting it with Prompt. Reading starts at location @@ -919,8 +919,8 @@ enter>1.0er. - Read and tokenize an Erlang form +

Reads data from the standard input (IoDevice), prompting it with Prompt. Starts reading @@ -939,9 +939,9 @@ enter>1.0er. + Read, tokenize and parse Erlang expressions - Read, tokenize and parse Erlang expressions

Reads data from the standard input (IoDevice), prompting it with @@ -990,9 +990,9 @@ enter>abc("hey". + Read, tokenize and parse an Erlang form - Read, tokenize and parse an Erlang form

Reads data from the standard input (IoDevice), prompting it with Prompt. Starts reading at diff --git a/lib/stdlib/doc/src/lists.xml b/lib/stdlib/doc/src/lists.xml index 46edd9fe16..89ba5238b5 100644 --- a/lib/stdlib/doc/src/lists.xml +++ b/lib/stdlib/doc/src/lists.xml @@ -283,8 +283,8 @@ flatmap(Fun, List1) -> - 1..tuple_size(Tuple) Search for an element in a list of tuples + 1..tuple_size(Tuple)

Searches the list of tuples TupleList for a tuple whose Nth element compares equal to Key. @@ -311,8 +311,8 @@ flatmap(Fun, List1) -> - 1..tuple_size(Tuple) Test for membership of a list of tuples + 1..tuple_size(Tuple)

Returns true if there is a tuple in TupleList whose Nth element compares equal to Key, otherwise @@ -346,8 +346,8 @@ flatmap(Fun, List1) -> - 1..tuple_size(Tuple) Search for an element in a list of tuples + 1..tuple_size(Tuple)

Searches the list of tuples TupleList for a tuple whose Nth element compares equal to Key. diff --git a/lib/stdlib/doc/src/math.xml b/lib/stdlib/doc/src/math.xml index 31e838d741..aee6c3f238 100644 --- a/lib/stdlib/doc/src/math.xml +++ b/lib/stdlib/doc/src/math.xml @@ -72,9 +72,9 @@ + Diverse math functions - Diverse math functions

A collection of math functions which return floats. Arguments are numbers.

diff --git a/lib/stdlib/doc/src/notes.xml b/lib/stdlib/doc/src/notes.xml index bdd0680038..c84ca9c8ad 100644 --- a/lib/stdlib/doc/src/notes.xml +++ b/lib/stdlib/doc/src/notes.xml @@ -154,8 +154,9 @@ Correct maps module error exceptions

Bad input to maps module function will now yield the - following exceptions: {badmap,NotMap} - or, badarg

+ following exceptions:

+ {badmap, NotMap}, or badarg. +

Own Id: OTP-12657

@@ -253,12 +254,11 @@

proc_lib:stop/1,3 is used by the following functions:

-

gen_server:stop/1,3 (new) gen_fsm:stop/1,3 (new) gen_event:stop/1,3 (modified to be synchronous) wx_object:stop/1,3 - (new)

+ (new)

Own Id: OTP-11173 Aux Id: seq12353

@@ -865,8 +865,7 @@ also implemented by the generic behaviours gen_server, gen_event and gen_fsm.

- The potential incompatibility refers to

-

+ The potential incompatibility refers to:

The previous behaviour of intercepting the system message and passing a tuple of size 2 as the last argument to sys:handle_system_msg/6 is no longer @@ -874,7 +873,7 @@ StateFun in sys:replace_state/2,3 fails is changed from being totally silent to possibly (if the callback module does not catch) throw an exception in the - client process.

+ client process.

(Thanks to James Fish and Steve Vinoski)

@@ -1036,22 +1035,28 @@

EEP43: New data type - Maps

- With Maps you may for instance: M0 = - #{ a => 1, b => 2}, % create - associations M1 = M0#{ a := 10 }, % - update values M2 = M1#{ "hi" => - "hello"}, % add new associations #{ - "hi" := V1, a := V2, b := V3} = M2. % match keys with - values

+ With Maps you may for instance:

+ + M0 = #{ a => 1, b => 2}, % create + associations + M1 = M0#{ a := 10 }, % update values + M2 = M1#{ "hi" => + "hello"}, % add new associations + #{ "hi" := V1, a := V2, b := V3} = M2. + % match keys with values +

For information on how to use Maps please see Map Expressions in the Reference Manual.

The current implementation is without the following - features: No variable keys - No single value access No map - comprehensions

+ features:

+ + No variable keys + No single value access + No map comprehensions +

Note that Maps is experimental during OTP 17.0.

@@ -1802,13 +1807,15 @@ supervisor or for the problematic child.

This introduces some incompatibilities in stdlib due to - new return values from supervisor: + new return values from supervisor:

+ restart_child/2 can now return {error,restarting} delete_child/2 can now return {error,restarting} which_children/1 returns a list of {Id,Child,Type,Mods}, where Child, in addition to the old pid() or 'undefined', now also can be - 'restarting'.

+ 'restarting'. +

*** POTENTIAL INCOMPATIBILITY ***

@@ -1824,10 +1831,10 @@ Own Id: OTP-9782 Aux Id: seq11964

-

Use universal time as base in error logger +

Use universal time as base in error logger

Previous conversion used the deprecated - calendar:local_time_to_universal_time/1

+ calendar:local_time_to_universal_time/1

Own Id: OTP-9854

@@ -2584,10 +2591,10 @@ Own Id: OTP-8989 Aux Id: seq11741

-

Fix exception generation in the io module +

Fix exception generation in the io module

Some functions did not generate correct badarg exception - on a badarg exception.

+ on a badarg exception.

Own Id: OTP-9045

diff --git a/lib/stdlib/doc/src/random.xml b/lib/stdlib/doc/src/random.xml index 91a4012ce9..a1bf67d332 100644 --- a/lib/stdlib/doc/src/random.xml +++ b/lib/stdlib/doc/src/random.xml @@ -76,9 +76,15 @@ dictionary, and returns the old state.

One easy way of obtaining a unique value to seed with is to:

- random:seed(erlang:phash2([node()]), - erlang:monotonic_time(), - erlang:unique_integer()) +random:seed(erlang:phash2([node()]), + erlang:monotonic_time(), + erlang:unique_integer()) +

See + erlang:phash2/1, + node/0, + erlang:monotonic_time/0, and + + erlang:unique_integer/0) for details.

diff --git a/lib/stdlib/doc/src/re.xml b/lib/stdlib/doc/src/re.xml index 46b382a6be..8c19926b10 100644 --- a/lib/stdlib/doc/src/re.xml +++ b/lib/stdlib/doc/src/re.xml @@ -205,8 +205,8 @@ This option makes it possible to include comments inside complicated patterns. N - See compile/2 above. Match a subject against regular expression and capture subpatterns + See compile/2 above.

Executes a regexp matching, returning match/{match, @@ -881,11 +881,11 @@ nomatch - - +

PERL LIKE REGULAR EXPRESSIONS SYNTAX -

The following sections contain reference material for the +

+ The following sections contain reference material for the regular expressions used by this module. The regular expression reference is based on the PCRE documentation, with changes in cases where the re module behaves differently to the PCRE library.

@@ -2070,7 +2070,7 @@ supported, and an error is given if they are encountered.

By default, in UTF modes, characters with values greater than 255 do not match any of the POSIX character classes. However, if the PCRE_UCP option is passed -to pcre_compile(), some of the classes are changed so that Unicode +to pcre_compile(), some of the classes are changed so that Unicode character properties are used. This is achieved by replacing the POSIX classes by other sequences, as follows:

@@ -2078,10 +2078,10 @@ by other sequences, as follows:

[:alnum:] becomes \p{Xan} [:alpha:] becomes \p{L} [:blank:] becomes \h - [:digit:] becomes \p{Nd} + [:digit:] becomes \p{Nd} [:lower:] becomes \p{Ll} [:space:] becomes \p{Xps} - [:upper:] becomes \p{Lu} + [:upper:] becomes \p{Lu} [:word:] becomes \p{Xwd} @@ -3059,7 +3059,7 @@ default newline convention is in force:

abc #comment \n still comment

-

On encountering the # character, pcre_compile() skips along, looking for +

On encountering the # character, pcre_compile() skips along, looking for a newline in the pattern. The sequence \n is still literal at this stage, so it does not terminate the comment. Only an actual character with the code value 0x0a (the default newline) does so.

diff --git a/lib/stdlib/doc/src/sofs.xml b/lib/stdlib/doc/src/sofs.xml index 5d7648d9a1..53f6ca957a 100644 --- a/lib/stdlib/doc/src/sofs.xml +++ b/lib/stdlib/doc/src/sofs.xml @@ -398,8 +398,9 @@ fun(S) -> sofs:partition(1, S) end - tuple_of(T) -

A tuple where the elements are of type T.

+ tuple_of(T) +

+ A tuple where the elements are of type T.

diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml index f08b752998..24ff251ce3 100644 --- a/lib/stdlib/doc/src/supervisor.xml +++ b/lib/stdlib/doc/src/supervisor.xml @@ -353,7 +353,7 @@

Dynamically adds a child specification to the supervisor SupRef which starts the corresponding child process.

-

SupRef can be:

+

SupRef can be:

the pid, Name, if the supervisor is locally registered, diff --git a/lib/stdlib/doc/src/sys.xml b/lib/stdlib/doc/src/sys.xml index 6ec515849e..d400f72e1d 100644 --- a/lib/stdlib/doc/src/sys.xml +++ b/lib/stdlib/doc/src/sys.xml @@ -238,8 +238,8 @@

These functions are intended only to help with debugging. They are provided for convenience, allowing developers to avoid having to create their own state extraction functions and also avoid having to interactively extract state from the return values of - get_status/1 or - get_status/2 while debugging.

+ get_status/1 or + get_status/2 while debugging.

The value of State varies for different types of processes. For a gen_server process, the returned State diff --git a/lib/stdlib/doc/src/timer.xml b/lib/stdlib/doc/src/timer.xml index e002f519b9..7609487300 100644 --- a/lib/stdlib/doc/src/timer.xml +++ b/lib/stdlib/doc/src/timer.xml @@ -85,7 +85,6 @@ Send Messageto Pidafter a specified Time. -

send_after/3 @@ -99,7 +98,6 @@

Same as send_after(Time, self(), Message).

-

@@ -109,7 +107,6 @@ Send an exit signal with Reasonafter a specified Time. -

exit_after/3 @@ -130,7 +127,6 @@

Same as exit_after(Time, self(), kill).

-

@@ -147,7 +143,6 @@ Send Messagerepeatedly at intervals of Time. -

send_interval/3 @@ -161,7 +156,6 @@

Same as send_interval(Time, self(), Message).

-

@@ -192,7 +186,6 @@ Function, Arguments) or apply(Fun, Arguments) In microseconds -

tc/3 @@ -213,7 +206,6 @@ -

diff --git a/lib/stdlib/doc/src/zip.xml b/lib/stdlib/doc/src/zip.xml index 4500995c34..186c8ac724 100644 --- a/lib/stdlib/doc/src/zip.xml +++ b/lib/stdlib/doc/src/zip.xml @@ -126,7 +126,7 @@ -

The name of a zip file.

+

The name of a zip file.

-- cgit v1.2.3