Skip to content

Commit

Permalink
Start on distinct types
Browse files Browse the repository at this point in the history
Part of #413.
  • Loading branch information
jclark committed May 1, 2020
1 parent 0c66384 commit 4e0b350
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion lang/spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ <h4>Type descriptors</h4>
<td>a sequence of values that can be generated lazily</td>
</tr>
<tr>
<td rowspan="9">other</td>
<td rowspan="11">other</td>
<td>singleton</td>
<td>a single value described by a literal</td>
</tr>
Expand Down Expand Up @@ -612,6 +612,10 @@ <h4>Type descriptors</h4>
<td>intersection</td>
<td>a value that belongs to all of a number of types</td>
</tr>
<tr>
<td>distinct</td>
<td></td>
</tr>
<tr>
<td>anydata</td>
<td>plain data (a simple value, sequence value or structured value that
Expand Down Expand Up @@ -2202,6 +2206,7 @@ <h3>Other type descriptors</h3>
| optional-type-descriptor
| union-type-descriptor
| intersection-type-descriptor
| distinct-type-descriptor
| anydata-type-descriptor
| json-type-descriptor
| byte-type-descriptor
Expand Down Expand Up @@ -2361,6 +2366,15 @@ <h4>Intersection types</h4>
<code>readonly&amp;T</code>, where <code>T</code> describes the primary aspect
of the shape.
</p>
</section>

<section>
<h4>Distinct types</h4>

<pre
class="grammar">distinct-type-descriptor := <code>distinct</code> type-descriptor
</pre>

</section>
<section>
<h4 id="anydata">Anydata type</h4>
Expand Down Expand Up @@ -7914,6 +7928,8 @@ <h3>Summary of changes from 2020R1 to 2020R2</h3>
<ol>
<li>The <code>readonly</code> type has been added.</li>
<li>Intersection types have been added.</li>
<li>Distinct types have been added; these provide the functionality
of nominal types with the framework of a structural type system.</li>
<li>The table type has been redesigned to be more consistent with other
structural types and no longer has preview status.</li>
<li>Enum declarations have been added.</li>
Expand Down

0 comments on commit 4e0b350

Please sign in to comment.