From 4fbe5a6ea946de03693ffa1be671cf9af93e55eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn-Egil=20Dahlberg?= Date: Mon, 12 Dec 2016 16:54:42 +0100 Subject: doc: Enchance map pair optional/mandatory notes --- system/doc/reference_manual/typespec.xml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'system/doc') diff --git a/system/doc/reference_manual/typespec.xml b/system/doc/reference_manual/typespec.xml index c117b6e1d0..a0ea41cb3b 100644 --- a/system/doc/reference_manual/typespec.xml +++ b/system/doc/reference_manual/typespec.xml @@ -142,8 +142,8 @@ PairList :: Pair | Pair, PairList - Pair :: Type := Type %% denotes a pair that must be present - | Type => Type + Pair :: Type := Type %% denotes a mandatory pair + | Type => Type %% denotes an optional pair TList :: Type | Type, TList @@ -176,7 +176,11 @@ The general form of maps is #{PairList}. The key types in PairList are allowed to overlap, and if they do, the leftmost pair takes precedence. A map pair has a key in - PairList if it belongs to this type. + PairList if it belongs to this type. A PairList may contain + both 'mandatory' and 'optional' pairs where 'mandatory' denotes that + a key type, and its associated value type, must be present. + In the case of an 'optional' pair it is not required for the key type to + be present.

Notice that the syntactic representation of map() is -- cgit v1.2.3