aboutsummaryrefslogtreecommitdiffstats
path: root/system/doc/reference_manual
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2015-12-01 10:59:04 +0100
committerHans Bolinder <[email protected]>2015-12-07 09:41:25 +0100
commit23b158133466f3fd60336672e11f43ffefb0c941 (patch)
treeda256565325db8f25eb3cc43241eba4334963f0f /system/doc/reference_manual
parentaf1e0396fda62efb6c0817134b419b166b110d09 (diff)
downloadotp-23b158133466f3fd60336672e11f43ffefb0c941.tar.gz
otp-23b158133466f3fd60336672e11f43ffefb0c941.tar.bz2
otp-23b158133466f3fd60336672e11f43ffefb0c941.zip
doc: Fix some minor issues in Types and Function Specifications
Diffstat (limited to 'system/doc/reference_manual')
-rw-r--r--system/doc/reference_manual/typespec.xml11
1 files changed, 7 insertions, 4 deletions
diff --git a/system/doc/reference_manual/typespec.xml b/system/doc/reference_manual/typespec.xml
index 7891f3a6b9..22627058c1 100644
--- a/system/doc/reference_manual/typespec.xml
+++ b/system/doc/reference_manual/typespec.xml
@@ -197,6 +197,9 @@
<cell><c>char()</c></cell><cell><c>0..16#10ffff</c></cell>
</row>
<row>
+ <cell><c>nil()</c></cell><cell><c>[]</c></cell>
+ </row>
+ <row>
<cell><c>number()</c></cell><cell><c>integer() | float()</c></cell>
</row>
<row>
@@ -312,7 +315,7 @@
<p>
As seen, the basic syntax of a type is an atom followed by closed
parentheses. New types are declared using <c>-type</c> and <c>-opaque</c>
- compiler attributes as in the following:
+ attributes as in the following:
</p>
<pre>
-type my_struct_type() :: Type.
@@ -435,8 +438,8 @@
<section>
<title>Specifications for Functions</title>
<p>
- A specification (or contract) for a function is given using the new
- compiler attribute <c>-spec</c>. The general format is as follows:
+ A specification (or contract) for a function is given using the
+ <c>-spec</c> attribute. The general format is as follows:
</p>
<pre>
-spec Module:Function(ArgType1, ..., ArgTypeN) -> ReturnType.</pre>
@@ -451,7 +454,7 @@
explicitly) import these functions.
</p>
<p>
- Within a given module, the following shorthand suffice in most cases:
+ Within a given module, the following shorthand suffices in most cases:
</p>
<pre>
-spec Function(ArgType1, ..., ArgTypeN) -> ReturnType.</pre>