From 1f8546a97f34f1f376685735f5486726d2015ee6 Mon Sep 17 00:00:00 2001 From: Alessio Faieta <29785188+alessiofaieta@users.noreply.github.com> Date: Fri, 23 Oct 2026 17:12:27 +0200 Subject: [PATCH] [spectec] Add period at the end of some sentences in the prose backend --- spectec/src/backend-prose/render.ml | 4 ++-- spectec/test-prose/TEST.md | 28 ++++++++++++++-------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/spectec/src/backend-prose/render.ml b/spectec/src/backend-prose/render.ml index eace2b6b4d..b58a5702cb 100644 --- a/spectec/src/backend-prose/render.ml +++ b/spectec/src/backend-prose/render.ml @@ -1363,7 +1363,7 @@ let rec render_instr env algoname index depth instr = match render_expr env arity with | "" -> "" | s -> - sprintf "\n\n%s%s Let %s be the arity of %s" + sprintf "\n\n%s%s Let %s be the arity of %s." (repeat indent depth) (render_order index depth) s @@ -1372,7 +1372,7 @@ let rec render_instr env algoname index depth instr = let rendered_arg = match atom_name with | "HANDLER_" -> - sprintf "\n\n%s%s Let %s be the catch handler of %s" + sprintf "\n\n%s%s Let %s be the catch handler of %s." (repeat indent depth) (render_order index depth) (render_expr env arg) diff --git a/spectec/test-prose/TEST.md b/spectec/test-prose/TEST.md index ff6159818c..a4aa9aeca6 100644 --- a/spectec/test-prose/TEST.md +++ b/spectec/test-prose/TEST.md @@ -1031,7 +1031,7 @@ The export :math:`(\mathsf{export}~{\mathit{name}}~{\mathit{externidx}})` is :re #. Let :math:`L` be the topmost :math:`\mathsf{label}`. -#. Let :math:`n` be the arity of :math:`L` +#. Let :math:`n` be the arity of :math:`L`. #. If :math:`{n'} = 0`, then: @@ -1100,7 +1100,7 @@ The export :math:`(\mathsf{export}~{\mathit{name}}~{\mathit{externidx}})` is :re 1. Let :math:`f` be the topmost :math:`\mathsf{frame}`. -#. Let :math:`n` be the arity of :math:`f` +#. Let :math:`n` be the arity of :math:`f`. #. Assert: Due to validation, there are at least :math:`n` values on the top of the stack. @@ -1123,7 +1123,7 @@ The export :math:`(\mathsf{export}~{\mathit{name}}~{\mathit{externidx}})` is :re a. Let :math:`f` be the topmost :math:`\mathsf{frame}`. - #. Let :math:`n` be the arity of :math:`f` + #. Let :math:`n` be the arity of :math:`f`. #. Assert: Due to validation, there are at least :math:`n` values on the top of the stack. @@ -6239,7 +6239,7 @@ The export :math:`(\mathsf{export}~{\mathit{name}}~{\mathit{externidx}})` is :re #. Let :math:`L` be the topmost :math:`\mathsf{label}`. -#. Let :math:`n` be the arity of :math:`L` +#. Let :math:`n` be the arity of :math:`L`. #. If :math:`{n'} = 0`, then: @@ -6308,7 +6308,7 @@ The export :math:`(\mathsf{export}~{\mathit{name}}~{\mathit{externidx}})` is :re 1. Let :math:`f` be the topmost :math:`\mathsf{frame}`. -#. Let :math:`n` be the arity of :math:`f` +#. Let :math:`n` be the arity of :math:`f`. #. Assert: Due to validation, there are at least :math:`n` values on the top of the stack. @@ -6331,7 +6331,7 @@ The export :math:`(\mathsf{export}~{\mathit{name}}~{\mathit{externidx}})` is :re a. Let :math:`f` be the topmost :math:`\mathsf{frame}`. - #. Let :math:`n` be the arity of :math:`f` + #. Let :math:`n` be the arity of :math:`f`. #. Assert: Due to validation, there are at least :math:`n` values on the top of the stack. @@ -18468,7 +18468,7 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i #. Let :math:`L` be the topmost :math:`\mathsf{label}`. -#. Let :math:`n` be the arity of :math:`L` +#. Let :math:`n` be the arity of :math:`L`. #. If :math:`l = 0`, then: @@ -18567,9 +18567,9 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i #. Let :math:`H` be the topmost :math:`\mathsf{handler}`. -#. Let :math:`n` be the arity of :math:`H` +#. Let :math:`n` be the arity of :math:`H`. -#. Let :math:`{{\mathit{catch}''}^\ast}` be the catch handler of :math:`H` +#. Let :math:`{{\mathit{catch}''}^\ast}` be the catch handler of :math:`H`. #. If :math:`{{\mathit{catch}''}^\ast} = \epsilon`, then: @@ -19119,7 +19119,7 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i a. Let :math:`L` be the topmost :math:`\mathsf{label}`. - #. Let :math:`n` be the arity of :math:`L` + #. Let :math:`n` be the arity of :math:`L`. #. If :math:`l = 0`, then: @@ -19256,7 +19256,7 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i 1. Let :math:`f` be the topmost :math:`\mathsf{frame}`. -#. Let :math:`n` be the arity of :math:`f` +#. Let :math:`n` be the arity of :math:`f`. #. Assert: Due to validation, there are at least :math:`n` values on the top of the stack. @@ -19279,7 +19279,7 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i a. Let :math:`f` be the topmost :math:`\mathsf{frame}`. - #. Let :math:`n` be the arity of :math:`f` + #. Let :math:`n` be the arity of :math:`f`. #. Assert: Due to validation, there are at least :math:`n` values on the top of the stack. @@ -20171,9 +20171,9 @@ The instruction sequence :math:`(\mathsf{block}~{\mathit{blocktype}}~{{\mathit{i a) Let :math:`H` be the topmost :math:`\mathsf{handler}`. - #) Let :math:`n` be the arity of :math:`H` + #) Let :math:`n` be the arity of :math:`H`. - #) Let :math:`{{\mathit{catch}''}^\ast}` be the catch handler of :math:`H` + #) Let :math:`{{\mathit{catch}''}^\ast}` be the catch handler of :math:`H`. #) If :math:`{{\mathit{catch}''}^\ast} = \epsilon`, then: