Skip to content

Commit

Permalink
Merge pull request #427 from WebAssembly/text-typedef
Browse files Browse the repository at this point in the history
Rename text "deftype" to "typedef"
  • Loading branch information
rossberg authored Sep 13, 2023
2 parents 675cda6 + aba1ace commit 02f5b3c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions document/core/text/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -670,8 +670,8 @@ The definition of the initial :ref:`identifier context <text-context>` :math:`I`

.. math::
\begin{array}{@{}lcl@{\qquad\qquad}l}
\F{idc}(\text{(}~\text{rec}~~\Tdeftype^\ast~\text{)}) &=&
\bigcompose \F{idc}(\Tdeftype)^\ast \\
\F{idc}(\text{(}~\text{rec}~~\Ttypedef^\ast~\text{)}) &=&
\bigcompose \F{idc}(\Ttypedef)^\ast \\
\F{idc}(\text{(}~\text{type}~\Tid^?~\Tsubtype~\text{)}) &=&
\{\ITYPES~(\Tid^?), \IFIELDS~\F{idf}(\Tsubtype), \ITYPEDEFS~\X{st}\} \\
\F{idc}(\text{(}~\text{func}~\Tid^?~\dots~\text{)}) &=&
Expand Down
10 changes: 5 additions & 5 deletions document/core/text/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -241,17 +241,17 @@ Composite Types
pair: text format; sub type
.. _text-rectype:
.. _text-subtype:
.. _text-deftype:
.. _text-typedef:

Recursive Types
~~~~~~~~~~~~~~~

.. math::
\begin{array}{llclll@{\qquad\qquad}l}
\production{recursive type} & \Trectype_I &::=&
\text{(}~\text{rec}~~\X{st}^\ast{:\,}\Tvec(\Tdeftype_I)~\text{)}
\text{(}~\text{rec}~~\X{st}^\ast{:\,}\Tvec(\Ttypedef_I)~\text{)}
&\Rightarrow& \TREC~\X{st}^\ast \\
\production{defined type} & \Tdeftype_I &::=&
\production{defined type} & \Ttypedef_I &::=&
\text{(}~\text{type}~~\Tid^?~~\X{st}{:}\Tsubtype_I~\text{)}
&\Rightarrow& \X{st} \\
\production{sub type} & \Tsubtype_I &::=&
Expand All @@ -268,8 +268,8 @@ Singular recursive types can omit the :math:`\text{rec}` keyword:
.. math::
\begin{array}{llclll}
\production{recursive type} &
\Tsubtype &\equiv&
\text{(}~~\text{rec}~~\Tsubtype~~\text{)} \\
\Ttypedef &\equiv&
\text{(}~~\text{rec}~~\Ttypedef~~\text{)} \\
\end{array}
Similarly, final sub types with no super-types can omit the |Tsub| keyword and arguments:
Expand Down
2 changes: 1 addition & 1 deletion document/core/util/macros.def
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@
.. |Tpackedtype| mathdef:: \xref{text/types}{text-packedtype}{\T{packedtype}}
.. |Tcomptype| mathdef:: \xref{text/types}{text-comptype}{\T{comptype}}
.. |Tsubtype| mathdef:: \xref{text/types}{text-subtype}{\T{subtype}}
.. |Tdeftype| mathdef:: \xref{text/types}{text-deftype}{\T{deftype}}
.. |Ttypedef| mathdef:: \xref{text/types}{text-typedef}{\T{typedef}}
.. |Trectype| mathdef:: \xref{text/types}{text-rectype}{\T{rectype}}

.. |Tglobaltype| mathdef:: \xref{text/types}{text-globaltype}{\T{globaltype}}
Expand Down

0 comments on commit 02f5b3c

Please sign in to comment.