Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit e172a0c

Browse files
committed
Fix todo:: Prose for valid-try-delegate.
1 parent 7b39b67 commit e172a0c

File tree

1 file changed

+24
-2
lines changed

1 file changed

+24
-2
lines changed

document/core/valid/instructions.rst

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1366,8 +1366,30 @@ Control Instructions
13661366
:math:`\TRY~\blocktype~\instr_1^\ast~(\CATCH~x~\instr_2^\ast)^\ast~(\CATCHALL~\instr_3^\ast)^?~\END`
13671367
....................................................................................................
13681368

1369-
.. todo::
1370-
Add prose.
1369+
* The :ref:`block type <syntax-blocktype>` must be :ref:`valid <valid-blocktype>` as some :ref:`function type <syntax-functype>` :math:`[t_1^\ast] \to [t_2^\ast]`.
1370+
1371+
* Let :math:`C'` be the same :ref:`context <context>` as :math:`C`, but with the :ref:`result type <syntax-resulttype>` :math:`[t_2^\ast]` prepended to the |CLABELS| vector.
1372+
1373+
* Under context :math:`C'`,
1374+
the instruction sequence :math:`\instr_1^\ast` must be :ref:`valid <valid-instr-seq>` with type :math:`[t_1^\ast] \to [t_2^\ast]`.
1375+
1376+
* Let :math:`C''` be the same :ref:`context <context>` as :math:`C`, but with the :ref:`label <exec-label>` :math:`\LCATCH~[t_2^\ast]` prepended to the |CLABELS| vector.
1377+
1378+
* For every :math:`(\CATCH~x~\instr_2^\ast)`:
1379+
1380+
* The tag :math:`C.\CTAGS[x]` must be defined in the context :math:`C`.
1381+
1382+
* Let :math:`[t^\ast] \to []` be its :ref:`tag type <syntax-tagtype>`.
1383+
1384+
* Under context :math:`C''`,
1385+
the instruction sequence :math:`\instr_2^\ast` must be :ref:`valid <valid-instr-seq>` with type :math:`[t^\ast] \to [t_2^\ast]`.
1386+
1387+
* If there is a :math:`(\CATCHALL~\instr_3^\ast)`, then:
1388+
1389+
* Under context :math:`C''`,
1390+
the instruction sequence :math:`\instr_3^\ast` must be :ref:`valid <valid-instr-seq>` with type :math:`[] \to [t_2^\ast]`.
1391+
1392+
* Then the compound instruction is valid with type :math:`[t_1^\ast] \to [t_2^\ast]`.
13711393

13721394
.. math::
13731395
\frac{

0 commit comments

Comments
 (0)