Skip to content

Commit

Permalink
Move error type into behavioral category
Browse files Browse the repository at this point in the history
Part of #463.
  • Loading branch information
jclark committed Mar 27, 2020
1 parent 9db2a08 commit 8ce5cd0
Showing 1 changed file with 22 additions and 25 deletions.
47 changes: 22 additions & 25 deletions lang/spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -505,7 +505,7 @@ <h4>Type descriptors</h4>
text items</td>
</tr>
<tr>
<td rowspan="6">basic, structured</td>
<td rowspan="5">basic, structured</td>
<td>array</td>
<td>an ordered list of values, optionally with a specific length, where a
single type is specified for all members of the list</td>
Expand All @@ -530,12 +530,12 @@ <h4>Type descriptors</h4>
<td>a two-dimensional collection of immutable values</td>
</tr>
<tr>
<td rowspan="8">basic, behavioral</td>
<td>error</td>
<td>an indication that there has been an error, with a string identifying the
reason for the error, and a mapping giving additional details about the error</td>
</tr>
<tr>
<td rowspan="7">basic, behavioral</td>
<td>function</td>
<td>a function with 0 or more specified parameter types and a single return
type</td>
Expand Down Expand Up @@ -1128,9 +1128,7 @@ <h5>XML namespaces</h5>
<section>
<h3>Structured values</h3>
<p>
There are four basic types of structured value. First, there are two container
basic types: list and mapping. Second, there are the table and error basic
types, which are each special in different ways.
There are three basic types of structured value: list, mapping and table.
</p>
<p>
A structured value is either mutable or immutable; whether it is mutable or
Expand Down Expand Up @@ -1177,7 +1175,6 @@ <h3>Structured values</h3>
list-type-descriptor
| mapping-type-descriptor
| table-type-descriptor
| error-type-descriptor
</pre>
<p>
The following table summarizes the type descriptors for structured types.
Expand Down Expand Up @@ -1547,6 +1544,22 @@ <h4>[Preview] Tables</h4>
</p>

</section>
</section>
<section>
<h3>Behavioral values</h3>

<pre
class="grammar">behavioral-type-descriptor :=
error-type-descriptor
| function-type-descriptor
| object-type-descriptor
| future-type-descriptor
| service-type-descriptor
| typedesc-type-descriptor
| handle-type-descriptor
| stream-type-descriptor
</pre>

<section>
<h4>Error</h4>

Expand All @@ -1559,10 +1572,9 @@ <h4>Error</h4>
inferred-error-type-param := <code>*</code>
</pre>
<p>
An error value belongs to the error basic type, which is a basic type which is
distinct from other structured types and is used only for representing errors.
The error type is inherently immutable. An error value contains the following
information:
An error value belongs to the error basic type, which is used only for
representing errors. The error type is inherently immutable. An error value
contains the following information:
</p>
<ul>
<li>a reason, which is a string identifier for the category of error</li>
Expand Down Expand Up @@ -1617,21 +1629,6 @@ <h4>Error</h4>
Error is the only structured basic type that is not iterable.
</p>
</section>
</section>
<section>
<h3>Behavioral values</h3>

<pre
class="grammar">behavioral-type-descriptor :=
function-type-descriptor
| object-type-descriptor
| future-type-descriptor
| service-type-descriptor
| typedesc-type-descriptor
| handle-type-descriptor
| stream-type-descriptor
</pre>


<section>
<h4 id="functions">Functions</h4>
Expand Down

0 comments on commit 8ce5cd0

Please sign in to comment.