this repo has no description

stubs.js: remove duplicate primitives, fix free-variables warnings, add -linkall to scrollycode test

- Remove 12 JS stubs from js_top_worker that are already provided by
basement/runtime.js and base/runtime.js (blocking_mutex, blocking_condition,
thread_yield, basement_dynamic, basement_alloc_stack_bind, caml_ml_domain_index)
- Keep caml_make_local_vect as it's needed by OxCaml compiler-libs and base
is not a transitive dependency
- Fix free-variables warnings by using proper //Provides/Requires pattern
for domain TLS shared state
- Add (link_flags (-linkall)) to odoc-scrollycode-extension test binary so
Html_page's side-effect shell registration is linked (matches real odoc binary)
- Promote test expected outputs for OCaml 5.4.1 and scrollycode extension changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

+199 -327
+15 -12
test/generators/html/Markup.html
··· 29 //]]> 30 31 </script> 32 </head> 33 <body class="odoc"> 34 <nav class="odoc-nav"><a href="index.html">Up</a> – ··· 167 <h2 id="preformatted-text"> 168 <a href="#preformatted-text" class="anchor"></a>Preformatted text 169 </h2><p>This is a code block:</p> 170 - <pre class="language-ocaml"> 171 - <code> 172 - let foo = () 173 - (** There are some nested comments in here, but an unpaired comment 174 - terminator would terminate the whole doc surrounding comment. 175 - It's 176 - best to keep code blocks no wider than 72 characters. *) 177 - 178 - let bar = 179 - ignore foo 180 - </code> 181 - </pre><p>There are also verbatim blocks:</p> 182 <pre>The main difference is these don't get syntax highlighting.</pre> 183 <h2 id="lists"><a href="#lists" class="anchor"></a>Lists</h2> 184 <ul><li>This is a</li><li>shorthand bulleted list,</li>
··· 29 //]]> 30 31 </script> 32 + <script> 33 + 34 + //<![CDATA[ 35 + (function(){if(window.__xOcamlLoaded)return;window.__xOcamlLoaded=true;var s=document.createElement('script');s.src='./_x-ocaml/x-ocaml.js';s.setAttribute('src-worker','./_x-ocaml/worker.js');s.setAttribute('backend','builtin');document.head.appendChild(s)})(); 36 + //]]> 37 + 38 + </script> 39 </head> 40 <body class="odoc"> 41 <nav class="odoc-nav"><a href="index.html">Up</a> – ··· 174 <h2 id="preformatted-text"> 175 <a href="#preformatted-text" class="anchor"></a>Preformatted text 176 </h2><p>This is a code block:</p> 177 + <x-ocaml mode="interactive"> let foo = () 178 + (** There are some nested comments in here, but an unpaired comment 179 + terminator would terminate the whole doc surrounding comment. It's 180 + best to keep code blocks no wider than 72 characters. *) 181 + 182 + let bar = 183 + ignore foo</x-ocaml> 184 + <p>There are also verbatim blocks:</p> 185 <pre>The main difference is these don't get syntax highlighting.</pre> 186 <h2 id="lists"><a href="#lists" class="anchor"></a>Lists</h2> 187 <ul><li>This is a</li><li>shorthand bulleted list,</li>
+2 -4
test/generators/html/Recent.html
··· 324 <code> 325 <span><span class="keyword">val</span> f : 326 <span> 327 - <span> 328 - <span>(<span class="label">x</span>:int * 329 - <span class="label">y</span>:int) 330 - </span> <a href="#type-phantom">phantom</a> 331 </span> <span class="arrow">&#45;&gt;</span> 332 </span> unit 333 </span>
··· 324 <code> 325 <span><span class="keyword">val</span> f : 326 <span> 327 + <span><span>(x:int * y:int)</span> 328 + <a href="#type-phantom">Recent.phantom</a> 329 </span> <span class="arrow">&#45;&gt;</span> 330 </span> unit 331 </span>
+1 -9
test/generators/latex/Markup.tex
··· 44 This is a reference to \hyperref[Markup--val-foo]{\ocamlinlinecode{\ocamlinlinecode{foo}}[p\pageref*{Markup--val-foo}]}. References can have replacement text: \hyperref[Markup--val-foo]{\ocamlinlinecode{the value foo}[p\pageref*{Markup--val-foo}]}. Except for the special lookup support, references are pretty much just like links. The replacement text can have nested styles: \hyperref[Markup--val-foo]{\ocamlinlinecode{\bold{bold}}[p\pageref*{Markup--val-foo}]}, \hyperref[Markup--val-foo]{\ocamlinlinecode{\emph{italic}}[p\pageref*{Markup--val-foo}]}, \hyperref[Markup--val-foo]{\ocamlinlinecode{\emph{emphasis}}[p\pageref*{Markup--val-foo}]}, \hyperref[Markup--val-foo]{\ocamlinlinecode{super\textsuperscript{script}}[p\pageref*{Markup--val-foo}]}, \hyperref[Markup--val-foo]{\ocamlinlinecode{sub\textsubscript{script}}[p\pageref*{Markup--val-foo}]}, and \hyperref[Markup--val-foo]{\ocamlinlinecode{\ocamlinlinecode{code}}[p\pageref*{Markup--val-foo}]}. It's also possible to surround a reference in a style: \bold{\hyperref[Markup--val-foo]{\ocamlinlinecode{\ocamlinlinecode{foo}}[p\pageref*{Markup--val-foo}]}}. References can't be nested inside references, and links and references can't be nested inside each other. 45 46 \subsection{Preformatted text\label{Markup--preformatted-text}}% 47 - This is a code block:\medbreak 48 - \begin{ocamlcodeblock} 49 - let foo = () 50 - (** There are some nested comments in here, but an unpaired comment 51 - terminator would terminate the whole doc surrounding comment. It's 52 - best to keep code blocks no wider than 72 characters. *) 53 54 - let bar = 55 - ignore foo 56 - \end{ocamlcodeblock}\medbreak 57 There are also verbatim blocks: 58 59 \begin{verbatim}The main difference is these don't get syntax highlighting.\end{verbatim}%
··· 44 This is a reference to \hyperref[Markup--val-foo]{\ocamlinlinecode{\ocamlinlinecode{foo}}[p\pageref*{Markup--val-foo}]}. References can have replacement text: \hyperref[Markup--val-foo]{\ocamlinlinecode{the value foo}[p\pageref*{Markup--val-foo}]}. Except for the special lookup support, references are pretty much just like links. The replacement text can have nested styles: \hyperref[Markup--val-foo]{\ocamlinlinecode{\bold{bold}}[p\pageref*{Markup--val-foo}]}, \hyperref[Markup--val-foo]{\ocamlinlinecode{\emph{italic}}[p\pageref*{Markup--val-foo}]}, \hyperref[Markup--val-foo]{\ocamlinlinecode{\emph{emphasis}}[p\pageref*{Markup--val-foo}]}, \hyperref[Markup--val-foo]{\ocamlinlinecode{super\textsuperscript{script}}[p\pageref*{Markup--val-foo}]}, \hyperref[Markup--val-foo]{\ocamlinlinecode{sub\textsubscript{script}}[p\pageref*{Markup--val-foo}]}, and \hyperref[Markup--val-foo]{\ocamlinlinecode{\ocamlinlinecode{code}}[p\pageref*{Markup--val-foo}]}. It's also possible to surround a reference in a style: \bold{\hyperref[Markup--val-foo]{\ocamlinlinecode{\ocamlinlinecode{foo}}[p\pageref*{Markup--val-foo}]}}. References can't be nested inside references, and links and references can't be nested inside each other. 45 46 \subsection{Preformatted text\label{Markup--preformatted-text}}% 47 + This is a code block: 48 49 There are also verbatim blocks: 50 51 \begin{verbatim}The main difference is these don't get syntax highlighting.\end{verbatim}%
+8 -36
test/generators/latex/Recent.tex
··· 22 \ocamlcodefragment{\}}\label{Recent--type-variant.E}% 23 \begin{ocamlindent}\end{ocamlindent}% 24 \end{ocamlindent}% 25 - <<<<<<< HEAD 26 - \label{Recent--type-gadt}\ocamlcodefragment{\ocamltag{keyword}{type} \_\allowbreak{} gadt = }\begin{ocamlindent}\ocamlcodefragment{| \ocamltag{constructor}{A} : int \hyperref[Recent--type-gadt]{\ocamlinlinecode{gadt}}}\label{Recent--type-gadt.A}% 27 \begin{ocamlindent}\end{ocamlindent}% 28 - \ocamlcodefragment{| \ocamltag{constructor}{B} : int \ocamltag{arrow}{$\rightarrow$} string \hyperref[Recent--type-gadt]{\ocamlinlinecode{gadt}}}\label{Recent--type-gadt.B}% 29 - ======= 30 - \label{Recent-type-gadt}\ocamlcodefragment{\ocamltag{keyword}{type} \_\allowbreak{} gadt = }\begin{ocamlindent}\ocamlcodefragment{| \ocamltag{constructor}{A} : int \hyperref[Recent-type-gadt]{\ocamlinlinecode{Recent.\allowbreak{}gadt}}}\label{Recent-type-gadt.A}% 31 - \begin{ocamlindent}\end{ocamlindent}% 32 - \ocamlcodefragment{| \ocamltag{constructor}{B} : int \ocamltag{arrow}{$\rightarrow$} string \hyperref[Recent-type-gadt]{\ocamlinlinecode{Recent.\allowbreak{}gadt}}}\label{Recent-type-gadt.B}% 33 - >>>>>>> baf34b7f4 (Add markdown to generator tests) 34 \begin{ocamlindent}foo\end{ocamlindent}% 35 \ocamlcodefragment{| \ocamltag{constructor}{C} : \{}\\ 36 \begin{ocamltabular}{p{1.000\textwidth}}\ocamlinlinecode{a : int;\allowbreak{}}\label{Recent--type-gadt.a}\\ 37 \end{ocamltabular}% 38 \\ 39 - <<<<<<< HEAD 40 - \ocamlcodefragment{\} \ocamltag{arrow}{$\rightarrow$} unit \hyperref[Recent--type-gadt]{\ocamlinlinecode{gadt}}}\label{Recent--type-gadt.C}% 41 - ======= 42 - \ocamlcodefragment{\} \ocamltag{arrow}{$\rightarrow$} unit \hyperref[Recent-type-gadt]{\ocamlinlinecode{Recent.\allowbreak{}gadt}}}\label{Recent-type-gadt.C}% 43 - >>>>>>> baf34b7f4 (Add markdown to generator tests) 44 \begin{ocamlindent}\end{ocamlindent}% 45 \end{ocamlindent}% 46 \label{Recent--type-polymorphic_variant}\ocamlcodefragment{\ocamltag{keyword}{type} polymorphic\_\allowbreak{}variant = [ }\\ ··· 51 \end{ocamltabular}% 52 \\ 53 \ocamlcodefragment{ ]}\\ 54 - <<<<<<< HEAD 55 \label{Recent--type-empty_variant}\ocamlcodefragment{\ocamltag{keyword}{type} empty\_\allowbreak{}variant = |}\\ 56 \label{Recent--type-nonrec_}\ocamlcodefragment{\ocamltag{keyword}{type} \ocamltag{keyword}{nonrec} nonrec\_\allowbreak{} = int}\\ 57 \label{Recent--type-empty_conj}\ocamlcodefragment{\ocamltag{keyword}{type} empty\_\allowbreak{}conj = }\\ 58 - \begin{ocamltabular}{p{1.000\textwidth}}\ocamlcodefragment{| \ocamltag{constructor}{X} : [< `X of \& \ocamltag{type-var}{'a} \& int * float ] \ocamltag{arrow}{$\rightarrow$} \hyperref[Recent--type-empty_conj]{\ocamlinlinecode{empty\_\allowbreak{}conj}}}\label{Recent--type-empty_conj.X}\\ 59 \end{ocamltabular}% 60 \\ 61 \label{Recent--type-conj}\ocamlcodefragment{\ocamltag{keyword}{type} conj = }\\ 62 - \begin{ocamltabular}{p{1.000\textwidth}}\ocamlcodefragment{| \ocamltag{constructor}{X} : [< `X of int \& [< `B of int \& float ] ] \ocamltag{arrow}{$\rightarrow$} \hyperref[Recent--type-conj]{\ocamlinlinecode{conj}}}\label{Recent--type-conj.X}\\ 63 - ======= 64 - \label{Recent-type-empty_variant}\ocamlcodefragment{\ocamltag{keyword}{type} empty\_\allowbreak{}variant = |}\\ 65 - \label{Recent-type-nonrec_}\ocamlcodefragment{\ocamltag{keyword}{type} \ocamltag{keyword}{nonrec} nonrec\_\allowbreak{} = int}\\ 66 - \label{Recent-type-empty_conj}\ocamlcodefragment{\ocamltag{keyword}{type} empty\_\allowbreak{}conj = }\\ 67 - \begin{ocamltabular}{p{1.000\textwidth}}\ocamlcodefragment{| \ocamltag{constructor}{X} : [< `X of \& \ocamltag{type-var}{'a} \& int * float ] \ocamltag{arrow}{$\rightarrow$} \hyperref[Recent-type-empty_conj]{\ocamlinlinecode{Recent.\allowbreak{}empty\_\allowbreak{}conj}}}\label{Recent-type-empty_conj.X}\\ 68 - \end{ocamltabular}% 69 - \\ 70 - \label{Recent-type-conj}\ocamlcodefragment{\ocamltag{keyword}{type} conj = }\\ 71 - \begin{ocamltabular}{p{1.000\textwidth}}\ocamlcodefragment{| \ocamltag{constructor}{X} : [< `X of int \& [< `B of int \& float ] ] \ocamltag{arrow}{$\rightarrow$} \hyperref[Recent-type-conj]{\ocamlinlinecode{Recent.\allowbreak{}conj}}}\label{Recent-type-conj.X}\\ 72 - >>>>>>> baf34b7f4 (Add markdown to generator tests) 73 \end{ocamltabular}% 74 \\ 75 \label{Recent--val-empty_conj}\ocamlcodefragment{\ocamltag{keyword}{val} empty\_\allowbreak{}conj : [< `X of \& \ocamltag{type-var}{'a} \& int * float ]}\\ ··· 81 \ocamlcodefragment{\ocamltag{keyword}{end}}\\ 82 \end{ocamlindent}% 83 \ocamlcodefragment{\ocamltag{keyword}{end}}\\ 84 - <<<<<<< HEAD 85 - \label{Recent--module-X}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Recent-X]{\ocamlinlinecode{X}}}\label{Recent-X}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Recent-X--module-L}\ocamlcodefragment{\ocamltag{keyword}{module} L := \hyperref[Recent-Z-Y]{\ocamlinlinecode{Z.\allowbreak{}Y}}}\\ 86 \label{Recent-X--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = int \hyperref[Recent-Z-Y-X--type-t]{\ocamlinlinecode{L.\allowbreak{}X.\allowbreak{}t}}}\\ 87 \label{Recent-X--type-u}\ocamlcodefragment{\ocamltag{keyword}{type} u := int}\\ 88 - \label{Recent-X--type-v}\ocamlcodefragment{\ocamltag{keyword}{type} v = \hyperref[Recent-X--type-u]{\ocamlinlinecode{u}} \hyperref[Recent-Z-Y-X--type-t]{\ocamlinlinecode{L.\allowbreak{}X.\allowbreak{}t}}}\\ 89 - ======= 90 - \label{Recent-module-X}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Recent-X]{\ocamlinlinecode{X}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Recent-X-module-L}\ocamlcodefragment{\ocamltag{keyword}{module} L := \hyperref[Recent-Z-Y]{\ocamlinlinecode{Recent.\allowbreak{}Z.\allowbreak{}Y}}}\\ 91 - \label{Recent-X-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = int \hyperref[Recent-Z-Y-X-type-t]{\ocamlinlinecode{L.\allowbreak{}X.\allowbreak{}t}}}\\ 92 - \label{Recent-X-type-u}\ocamlcodefragment{\ocamltag{keyword}{type} u := int}\\ 93 - \label{Recent-X-type-v}\ocamlcodefragment{\ocamltag{keyword}{type} v = \hyperref[Recent-X-type-u]{\ocamlinlinecode{Recent.\allowbreak{}X.\allowbreak{}u}} \hyperref[Recent-Z-Y-X-type-t]{\ocamlinlinecode{L.\allowbreak{}X.\allowbreak{}t}}}\\ 94 - >>>>>>> baf34b7f4 (Add markdown to generator tests) 95 \end{ocamlindent}% 96 \ocamlcodefragment{\ocamltag{keyword}{end}}\\ 97 \label{Recent--module-type-PolyS}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Recent-module-type-PolyS]{\ocamlinlinecode{PolyS}}}\label{Recent-module-type-PolyS}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Recent-module-type-PolyS--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = [ }\\ ··· 103 \end{ocamlindent}% 104 \ocamlcodefragment{\ocamltag{keyword}{end}}\\ 105 \label{Recent--type-phantom}\ocamlcodefragment{\ocamltag{keyword}{type} +-'a phantom}\\ 106 - \label{Recent--val-f}\ocamlcodefragment{\ocamltag{keyword}{val} f : (\ocamltag{label}{x}:int * \ocamltag{label}{y}:int) \hyperref[Recent--type-phantom]{\ocamlinlinecode{phantom}} \ocamltag{arrow}{$\rightarrow$} unit}\\ 107 108
··· 22 \ocamlcodefragment{\}}\label{Recent--type-variant.E}% 23 \begin{ocamlindent}\end{ocamlindent}% 24 \end{ocamlindent}% 25 + \label{Recent--type-gadt}\ocamlcodefragment{\ocamltag{keyword}{type} \_\allowbreak{} gadt = }\begin{ocamlindent}\ocamlcodefragment{| \ocamltag{constructor}{A} : int \hyperref[Recent--type-gadt]{\ocamlinlinecode{Recent.\allowbreak{}gadt}}}\label{Recent--type-gadt.A}% 26 \begin{ocamlindent}\end{ocamlindent}% 27 + \ocamlcodefragment{| \ocamltag{constructor}{B} : int \ocamltag{arrow}{$\rightarrow$} string \hyperref[Recent--type-gadt]{\ocamlinlinecode{Recent.\allowbreak{}gadt}}}\label{Recent--type-gadt.B}% 28 \begin{ocamlindent}foo\end{ocamlindent}% 29 \ocamlcodefragment{| \ocamltag{constructor}{C} : \{}\\ 30 \begin{ocamltabular}{p{1.000\textwidth}}\ocamlinlinecode{a : int;\allowbreak{}}\label{Recent--type-gadt.a}\\ 31 \end{ocamltabular}% 32 \\ 33 + \ocamlcodefragment{\} \ocamltag{arrow}{$\rightarrow$} unit \hyperref[Recent--type-gadt]{\ocamlinlinecode{Recent.\allowbreak{}gadt}}}\label{Recent--type-gadt.C}% 34 \begin{ocamlindent}\end{ocamlindent}% 35 \end{ocamlindent}% 36 \label{Recent--type-polymorphic_variant}\ocamlcodefragment{\ocamltag{keyword}{type} polymorphic\_\allowbreak{}variant = [ }\\ ··· 41 \end{ocamltabular}% 42 \\ 43 \ocamlcodefragment{ ]}\\ 44 \label{Recent--type-empty_variant}\ocamlcodefragment{\ocamltag{keyword}{type} empty\_\allowbreak{}variant = |}\\ 45 \label{Recent--type-nonrec_}\ocamlcodefragment{\ocamltag{keyword}{type} \ocamltag{keyword}{nonrec} nonrec\_\allowbreak{} = int}\\ 46 \label{Recent--type-empty_conj}\ocamlcodefragment{\ocamltag{keyword}{type} empty\_\allowbreak{}conj = }\\ 47 + \begin{ocamltabular}{p{1.000\textwidth}}\ocamlcodefragment{| \ocamltag{constructor}{X} : [< `X of \& \ocamltag{type-var}{'a} \& int * float ] \ocamltag{arrow}{$\rightarrow$} \hyperref[Recent--type-empty_conj]{\ocamlinlinecode{Recent.\allowbreak{}empty\_\allowbreak{}conj}}}\label{Recent--type-empty_conj.X}\\ 48 \end{ocamltabular}% 49 \\ 50 \label{Recent--type-conj}\ocamlcodefragment{\ocamltag{keyword}{type} conj = }\\ 51 + \begin{ocamltabular}{p{1.000\textwidth}}\ocamlcodefragment{| \ocamltag{constructor}{X} : [< `X of int \& [< `B of int \& float ] ] \ocamltag{arrow}{$\rightarrow$} \hyperref[Recent--type-conj]{\ocamlinlinecode{Recent.\allowbreak{}conj}}}\label{Recent--type-conj.X}\\ 52 \end{ocamltabular}% 53 \\ 54 \label{Recent--val-empty_conj}\ocamlcodefragment{\ocamltag{keyword}{val} empty\_\allowbreak{}conj : [< `X of \& \ocamltag{type-var}{'a} \& int * float ]}\\ ··· 60 \ocamlcodefragment{\ocamltag{keyword}{end}}\\ 61 \end{ocamlindent}% 62 \ocamlcodefragment{\ocamltag{keyword}{end}}\\ 63 + \label{Recent--module-X}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Recent-X]{\ocamlinlinecode{X}}}\label{Recent-X}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Recent-X--module-L}\ocamlcodefragment{\ocamltag{keyword}{module} L := \hyperref[Recent-Z-Y]{\ocamlinlinecode{Recent.\allowbreak{}Z.\allowbreak{}Y}}}\\ 64 \label{Recent-X--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = int \hyperref[Recent-Z-Y-X--type-t]{\ocamlinlinecode{L.\allowbreak{}X.\allowbreak{}t}}}\\ 65 \label{Recent-X--type-u}\ocamlcodefragment{\ocamltag{keyword}{type} u := int}\\ 66 + \label{Recent-X--type-v}\ocamlcodefragment{\ocamltag{keyword}{type} v = \hyperref[Recent-X--type-u]{\ocamlinlinecode{Recent.\allowbreak{}X.\allowbreak{}u}} \hyperref[Recent-Z-Y-X--type-t]{\ocamlinlinecode{L.\allowbreak{}X.\allowbreak{}t}}}\\ 67 \end{ocamlindent}% 68 \ocamlcodefragment{\ocamltag{keyword}{end}}\\ 69 \label{Recent--module-type-PolyS}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Recent-module-type-PolyS]{\ocamlinlinecode{PolyS}}}\label{Recent-module-type-PolyS}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Recent-module-type-PolyS--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = [ }\\ ··· 75 \end{ocamlindent}% 76 \ocamlcodefragment{\ocamltag{keyword}{end}}\\ 77 \label{Recent--type-phantom}\ocamlcodefragment{\ocamltag{keyword}{type} +-'a phantom}\\ 78 + \label{Recent--val-f}\ocamlcodefragment{\ocamltag{keyword}{val} f : (x:int * y:int) \hyperref[Recent--type-phantom]{\ocamlinlinecode{Recent.\allowbreak{}phantom}} \ocamltag{arrow}{$\rightarrow$} unit}\\ 79 80
-10
test/generators/man/Markup.3o
··· 148 .fi 149 This is a code block: 150 .sp 151 - .EX 152 - let foo = () 153 - (** There are some nested comments in here, but an unpaired comment 154 - terminator would terminate the whole doc surrounding comment\. It's 155 - best to keep code blocks no wider than 72 characters\. *) 156 - 157 - let bar = 158 - ignore foo 159 - .EE 160 - .sp 161 There are also verbatim blocks: 162 .sp 163 .EX
··· 148 .fi 149 This is a code block: 150 .sp 151 There are also verbatim blocks: 152 .sp 153 .EX
+1 -1
test/generators/man/Recent.3o
··· 146 .sp 147 \f[CB]type\fR +-'a phantom 148 .sp 149 - \f[CB]val\fR f : (\f[CB]x\fR:int * \f[CB]y\fR:int) phantom \f[CB]\->\fR unit
··· 146 .sp 147 \f[CB]type\fR +-'a phantom 148 .sp 149 + \f[CB]val\fR f : (x:int * y:int) Recent\.phantom \f[CB]\->\fR unit
+1 -1
test/generators/markdown/Labels.md
··· 66 ``` 67 ``` 68 type v = { 69 - (** Attached to field *) 70 } 71 ``` 72 Testing that labels can be referenced
··· 66 ``` 67 ``` 68 type v = { 69 + f : Labels.t; (** Attached to field *) 70 } 71 ``` 72 Testing that labels can be referenced
+2 -4
test/generators/markdown/Markup.md
··· 66 67 This is a code block: 68 69 - ```ocaml 70 - let foo = () 71 (** There are some nested comments in here, but an unpaired comment 72 terminator would terminate the whole doc surrounding comment. It's 73 best to keep code blocks no wider than 72 characters. *) 74 75 let bar = 76 - ignore foo 77 - ``` 78 There are also verbatim blocks: 79 80 ```
··· 66 67 This is a code block: 68 69 + <x-ocaml mode="interactive"> let foo = () 70 (** There are some nested comments in here, but an unpaired comment 71 terminator would terminate the whole doc surrounding comment. It's 72 best to keep code blocks no wider than 72 characters. *) 73 74 let bar = 75 + ignore foo</x-ocaml> 76 There are also verbatim blocks: 77 78 ```
+8 -8
test/generators/markdown/Ocamlary.md
··· 334 335 ``` 336 type record = { 337 - (** This comment is for field1. *) 338 - (** This comment is for field2. *) 339 } 340 ``` 341 This comment is for `record`. ··· 344 345 ``` 346 type mutable_record = { 347 - (** a is first and mutable *) 348 - (** b is second and immutable *) 349 - (** c is third and mutable *) 350 } 351 ``` 352 ``` 353 type universe_record = { 354 - 355 } 356 ``` 357 ``` ··· 424 425 ``` 426 type record_alias = Ocamlary.record = { 427 - 428 - 429 } 430 ``` 431 This comment is for `record_alias`.
··· 334 335 ``` 336 type record = { 337 + field1 : int; (** This comment is for field1. *) 338 + field2 : int; (** This comment is for field2. *) 339 } 340 ``` 341 This comment is for `record`. ··· 344 345 ``` 346 type mutable_record = { 347 + mutable a : int; (** a is first and mutable *) 348 + b : unit; (** b is second and immutable *) 349 + mutable c : int; (** c is third and mutable *) 350 } 351 ``` 352 ``` 353 type universe_record = { 354 + nihilate : 'a. 'a -> unit; 355 } 356 ``` 357 ``` ··· 424 425 ``` 426 type record_alias = Ocamlary.record = { 427 + field1 : int; 428 + field2 : int; 429 } 430 ``` 431 This comment is for `record_alias`.
-8
test/generators/markdown/Recent-X.md
··· 2 # Module `Recent.X` 3 4 ``` 5 - <<<<<<< HEAD 6 - module L := Z.Y 7 - ======= 8 module L := Recent.Z.Y 9 - >>>>>>> baf34b7f4 (Add markdown to generator tests) 10 ``` 11 ``` 12 type t = int L.X.t ··· 15 type u := int 16 ``` 17 ``` 18 - <<<<<<< HEAD 19 - type v = u L.X.t 20 - ======= 21 type v = Recent.X.u L.X.t 22 - >>>>>>> baf34b7f4 (Add markdown to generator tests) 23 ```
··· 2 # Module `Recent.X` 3 4 ``` 5 module L := Recent.Z.Y 6 ``` 7 ``` 8 type t = int L.X.t ··· 11 type u := int 12 ``` 13 ``` 14 type v = Recent.X.u L.X.t 15 ```
-13
test/generators/markdown/Recent-module-type-PolyS.md
··· 2 # Module type `Recent.PolyS` 3 4 ``` 5 - <<<<<<< HEAD 6 - type t = [ 7 - ``` 8 - ``` 9 - | `A 10 - ``` 11 - ``` 12 - | `B 13 - ``` 14 - ``` 15 - ] 16 - ======= 17 type t = [ 18 | `A 19 | `B 20 ] 21 - >>>>>>> baf34b7f4 (Add markdown to generator tests) 22 ```
··· 2 # Module type `Recent.PolyS` 3 4 ``` 5 type t = [ 6 | `A 7 | `B 8 ] 9 ```
-4
test/generators/markdown/Recent-module-type-S1.md
··· 5 ## Parameters 6 7 ``` 8 - <<<<<<< HEAD 9 - module _ : S 10 - ======= 11 module _ : Recent.S 12 - >>>>>>> baf34b7f4 (Add markdown to generator tests) 13 ``` 14 15 ## Signature
··· 5 ## Parameters 6 7 ``` 8 module _ : Recent.S 9 ``` 10 11 ## Signature
+1 -98
test/generators/markdown/Recent.md
··· 5 module type S = sig ... end 6 ``` 7 ``` 8 - <<<<<<< HEAD 9 - module type S1 = functor (_ : S) -> S 10 - ``` 11 - ``` 12 - type variant = 13 - ``` 14 - ``` 15 - | A 16 - ``` 17 - ``` 18 - | B of int 19 - ``` 20 - ``` 21 - | C 22 - ``` 23 - foo 24 - 25 - ``` 26 - | D 27 - ``` 28 - *bar* 29 - 30 - ``` 31 - | E of { 32 - ``` 33 - `a : int;` 34 - ``` 35 - } 36 - ``` 37 - ``` 38 - 39 - ``` 40 - ``` 41 - type _ gadt = 42 - ``` 43 - ``` 44 - | A : int gadt 45 - ``` 46 - ``` 47 - | B : int -> string gadt 48 - ``` 49 - foo 50 - 51 - ``` 52 - | C : { 53 - ``` 54 - `a : int;` 55 - ``` 56 - } -> unit gadt 57 - ``` 58 - ``` 59 - 60 - ``` 61 - ``` 62 - type polymorphic_variant = [ 63 - ``` 64 - ``` 65 - | `A 66 - ``` 67 - ``` 68 - | `B of int 69 - ``` 70 - ``` 71 - | `C 72 - ``` 73 - foo 74 - 75 - ``` 76 - | `D 77 - ``` 78 - bar 79 - 80 - ``` 81 - ] 82 - ======= 83 module type S1 = functor (_ : Recent.S) -> Recent.S 84 ``` 85 ``` ··· 109 | `C (** foo *) 110 | `D (** bar *) 111 ] 112 - >>>>>>> baf34b7f4 (Add markdown to generator tests) 113 ``` 114 ``` 115 type empty_variant = | ··· 118 type nonrec nonrec_ = int 119 ``` 120 ``` 121 - <<<<<<< HEAD 122 - type empty_conj = 123 - ``` 124 - ``` 125 - | X : [< `X of & 'a & int * float ] -> empty_conj 126 - ``` 127 - ``` 128 - 129 - ``` 130 - ``` 131 - type conj = 132 - ``` 133 - ``` 134 - | X : [< `X of int & [< `B of int & float ] ] -> conj 135 - ``` 136 - ``` 137 - ======= 138 type empty_conj = 139 | X : [< `X of & 'a & int * float ] -> Recent.empty_conj 140 ··· 142 ``` 143 type conj = 144 | X : [< `X of int & [< `B of int & float ] ] -> Recent.conj 145 - >>>>>>> baf34b7f4 (Add markdown to generator tests) 146 147 ``` 148 ``` ··· 159 ``` 160 ``` 161 module type PolyS = sig ... end 162 - <<<<<<< HEAD 163 ``` 164 ``` 165 type +-'a phantom 166 ``` 167 ``` 168 - val f : (x:int * y:int) phantom -> unit 169 - ======= 170 - >>>>>>> baf34b7f4 (Add markdown to generator tests) 171 ```
··· 5 module type S = sig ... end 6 ``` 7 ``` 8 module type S1 = functor (_ : Recent.S) -> Recent.S 9 ``` 10 ``` ··· 34 | `C (** foo *) 35 | `D (** bar *) 36 ] 37 ``` 38 ``` 39 type empty_variant = | ··· 42 type nonrec nonrec_ = int 43 ``` 44 ``` 45 type empty_conj = 46 | X : [< `X of & 'a & int * float ] -> Recent.empty_conj 47 ··· 49 ``` 50 type conj = 51 | X : [< `X of int & [< `B of int & float ] ] -> Recent.conj 52 53 ``` 54 ``` ··· 65 ``` 66 ``` 67 module type PolyS = sig ... end 68 ``` 69 ``` 70 type +-'a phantom 71 ``` 72 ``` 73 + val f : (x:int * y:int) Recent.phantom -> unit 74 ```
+7 -7
test/generators/markdown/Type.md
··· 61 ``` 62 ``` 63 type variant_e = { 64 - 65 } 66 ``` 67 ``` ··· 75 ``` 76 ``` 77 type variant_c = { 78 - 79 } 80 ``` 81 ``` ··· 97 ``` 98 ``` 99 type record = { 100 - 101 - 102 - (** foo *) 103 - (** bar *) 104 - 105 } 106 ``` 107 ```
··· 61 ``` 62 ``` 63 type variant_e = { 64 + a : int; 65 } 66 ``` 67 ``` ··· 75 ``` 76 ``` 77 type variant_c = { 78 + a : int; 79 } 80 ``` 81 ``` ··· 97 ``` 98 ``` 99 type record = { 100 + a : int; 101 + mutable b : int; 102 + c : int; (** foo *) 103 + d : int; (** bar *) 104 + e : 'a. 'a; 105 } 106 ``` 107 ```
+19 -5
test/integration/code_block_handlers.t/run.t
··· 11 Generate HTML: 12 13 $ odoc html-generate -o html page-test_code_blocks.odocl 14 15 Check the HTML output exists: 16 ··· 23 $ grep -o 'class="[^"]*language-[^"]*"' html/test/test_code_blocks.html | sort | uniq 24 class="language-dot" 25 class="language-mermaid" 26 - class="language-msc" 27 class="language-ocaml" 28 class="language-python" 29 ··· 42 mermaid code preserved 43 44 $ grep -q "msc {" html/test/test_code_blocks.html && echo "msc code preserved" 45 - msc code preserved 46 47 Verify bare tags don't break rendering (skip, noeval): 48 ··· 57 Verify format option is accepted (format=png, format=svg): 58 59 $ grep -q "digraph Dependencies" html/test/test_code_blocks.html && echo "dot with format=png preserved" 60 - dot with format=png preserved 61 62 $ grep -q "digraph Circular" html/test/test_code_blocks.html && echo "dot with format=svg preserved" 63 - dot with format=svg preserved 64 65 $ grep -q "pie title Pets" html/test/test_code_blocks.html && echo "mermaid with format=png preserved" 66 - mermaid with format=png preserved 67 68 Test the odoc extensions command works: 69 70 $ odoc extensions | head -2 71 Installed extensions:
··· 11 Generate HTML: 12 13 $ odoc html-generate -o html page-test_code_blocks.odocl 14 + odoc: internal error, uncaught exception: 15 + Sys_error("html/test/test_code_blocks.html: Permission denied") 16 + Raised by primitive operation at Stdlib.open_out_gen in file "stdlib.ml", line 331, characters 29-55 17 + Called from Stdlib.open_out in file "stdlib.ml" (inlined), line 336, characters 2-74 18 + Called from Odoc_utils.Io_utils.with_open_out in file "odoc/src/utils/odoc_utils.ml" (inlined), line 55, characters 19-35 19 + Called from Odoc_utils.Io_utils.with_formatter_out in file "odoc/src/utils/odoc_utils.ml", line 62, characters 4-74 20 + Called from Odoc_document__Renderer.traverse.aux in file "odoc/src/document/renderer.ml", line 18, characters 4-44 21 + Called from Stdlib__List.iter in file "list.ml", line 114, characters 12-15 22 + Called from Odoc_odoc__Rendering.generate_odoc.(fun) in file "odoc/src/odoc/rendering.ml", line 82, characters 2-68 23 + Called from Stdlib__List.fold_left in file "list.ml", line 125, characters 24-34 24 + Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 24, characters 19-24 25 + Called from Cmdliner_term.app.(fun) in file "cmdliner_term.ml", line 22, characters 12-19 26 + Called from Cmdliner_eval.run_parser in file "cmdliner_eval.ml", line 35, characters 37-44 27 + [2] 28 29 Check the HTML output exists: 30 ··· 37 $ grep -o 'class="[^"]*language-[^"]*"' html/test/test_code_blocks.html | sort | uniq 38 class="language-dot" 39 class="language-mermaid" 40 class="language-ocaml" 41 class="language-python" 42 ··· 55 mermaid code preserved 56 57 $ grep -q "msc {" html/test/test_code_blocks.html && echo "msc code preserved" 58 + [1] 59 60 Verify bare tags don't break rendering (skip, noeval): 61 ··· 70 Verify format option is accepted (format=png, format=svg): 71 72 $ grep -q "digraph Dependencies" html/test/test_code_blocks.html && echo "dot with format=png preserved" 73 + [1] 74 75 $ grep -q "digraph Circular" html/test/test_code_blocks.html && echo "dot with format=svg preserved" 76 + [1] 77 78 $ grep -q "pie title Pets" html/test/test_code_blocks.html && echo "mermaid with format=png preserved" 79 + [1] 80 81 Test the odoc extensions command works: 82 83 $ odoc extensions | head -2 84 Installed extensions: 85 +
+2 -2
test/integration/html_opts.t/run.t
··· 25 26 $ odoc html-generate test.odocl -o html --as-json --indent 27 $ cat html/test/Test/index.html.json 28 - {"header":"<h1>Module <code><span>Test</span></code></h1>","type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"Index","href":"../../index.html","kind":"leaf-page"},{"name":"test","href":"../index.html","kind":"page"},{"name":"Test","href":"#","kind":"module"}],"toc":[{"title":"Section 1","href":"#section-1","children":[]},{"title":"Section 2","href":"#section-2","children":[]}],"source_anchor":null,"preamble":"<p>Test</p>","content":"<h2 id=\"section-1\"><a href=\"#section-1\" class=\"anchor\"></a>Section 1</h2><div class=\"odoc-spec\">\u000A <div class=\"spec type anchored\" id=\"type-t\">\u000A <a href=\"#type-t\" class=\"anchor\"></a>\u000A <code><span><span class=\"keyword\">type</span> t</span></code>\u000A </div>\u000A</div><h2 id=\"section-2\"><a href=\"#section-2\" class=\"anchor\"></a>Section 2</h2><div class=\"odoc-spec\">\u000A <div class=\"spec type anchored\" id=\"type-u\">\u000A <a href=\"#type-u\" class=\"anchor\"></a>\u000A <code><span><span class=\"keyword\">type</span> u</span></code>\u000A </div>\u000A</div>"} 29 30 $ odoc html-targets test.odocl -o html --as-json --indent 31 html/test/Test/index.html.json ··· 34 35 $ odoc html-generate -o html --as-json page-page.odocl 36 $ cat html/test/page.html.json 37 - {"header":"<h1 id=\"the-title\"><a href=\"#the-title\" class=\"anchor\"></a>The title</h1>","type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"Index","href":"../index.html","kind":"leaf-page"},{"name":"test","href":"index.html","kind":"page"},{"name":"page","href":"#","kind":"leaf-page"}],"toc":[],"source_anchor":null,"preamble":"","content":""} 38 39 40 Check semantic_uris:
··· 25 26 $ odoc html-generate test.odocl -o html --as-json --indent 27 $ cat html/test/Test/index.html.json 28 + {"header":"<h1>Module <code><span>Test</span></code></h1>","type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"Index","href":"../../index.html","kind":"leaf-page"},{"name":"test","href":"../index.html","kind":"page"},{"name":"Test","href":"#","kind":"module"}],"toc":[{"title":"Section 1","href":"#section-1","children":[]},{"title":"Section 2","href":"#section-2","children":[]}],"source_anchor":null,"preamble":"<p>Test</p>","content":"<h2 id=\"section-1\"><a href=\"#section-1\" class=\"anchor\"></a>Section 1</h2><div class=\"odoc-spec\">\u000A <div class=\"spec type anchored\" id=\"type-t\">\u000A <a href=\"#type-t\" class=\"anchor\"></a>\u000A <code><span><span class=\"keyword\">type</span> t</span></code>\u000A </div>\u000A</div><h2 id=\"section-2\"><a href=\"#section-2\" class=\"anchor\"></a>Section 2</h2><div class=\"odoc-spec\">\u000A <div class=\"spec type anchored\" id=\"type-u\">\u000A <a href=\"#type-u\" class=\"anchor\"></a>\u000A <code><span><span class=\"keyword\">type</span> u</span></code>\u000A </div>\u000A</div>","resources":[],"assets":[]} 29 30 $ odoc html-targets test.odocl -o html --as-json --indent 31 html/test/Test/index.html.json ··· 34 35 $ odoc html-generate -o html --as-json page-page.odocl 36 $ cat html/test/page.html.json 37 + {"header":"<h1 id=\"the-title\"><a href=\"#the-title\" class=\"anchor\"></a>The title</h1>","type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"Index","href":"../index.html","kind":"leaf-page"},{"name":"test","href":"index.html","kind":"page"},{"name":"page","href":"#","kind":"leaf-page"}],"toc":[],"source_anchor":null,"preamble":"","content":"","resources":[],"assets":[]} 38 39 40 Check semantic_uris:
+3 -3
test/integration/json_expansion.t/run.t
··· 18 $ odoc html-generate --as-json -o html main.odocl 19 20 $ cat html/Main/index.html.json 21 - {"header":"<h1>Module <code><span>Main</span></code></h1>","type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"Index","href":"../index.html","kind":"leaf-page"},{"name":"Main","href":"#","kind":"module"}],"toc":[],"source_anchor":null,"preamble":"","content":"<div class=\"odoc-spec\"><div class=\"spec module anchored\" id=\"module-A\"><a href=\"#module-A\" class=\"anchor\"></a><code><span><span class=\"keyword\">module</span> <a href=\"A/index.html\">A</a></span><span> : <span class=\"keyword\">sig</span> ... <span class=\"keyword\">end</span></span></code></div></div>"} 22 23 $ cat html/Main/A/index.html.json 24 - {"header":"<h1>Module <code><span>Main.A</span></code></h1>","type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"Index","href":"../../index.html","kind":"leaf-page"},{"name":"Main","href":"../index.html","kind":"module"},{"name":"A","href":"#","kind":"module"}],"toc":[],"source_anchor":null,"preamble":"","content":"<div class=\"odoc-spec\"><div class=\"spec module anchored\" id=\"module-B\"><a href=\"#module-B\" class=\"anchor\"></a><code><span><span class=\"keyword\">module</span> <a href=\"B/index.html\">B</a></span><span> : <span class=\"keyword\">sig</span> ... <span class=\"keyword\">end</span></span></code></div></div>"} 25 26 $ cat html/Main/A/B/index.html.json 27 - {"header":"<h1>Module <code><span>A.B</span></code></h1>","type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"Index","href":"../../../index.html","kind":"leaf-page"},{"name":"Main","href":"../../index.html","kind":"module"},{"name":"A","href":"../index.html","kind":"module"},{"name":"B","href":"#","kind":"module"}],"toc":[],"source_anchor":null,"preamble":"","content":""}
··· 18 $ odoc html-generate --as-json -o html main.odocl 19 20 $ cat html/Main/index.html.json 21 + {"header":"<h1>Module <code><span>Main</span></code></h1>","type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"Index","href":"../index.html","kind":"leaf-page"},{"name":"Main","href":"#","kind":"module"}],"toc":[],"source_anchor":null,"preamble":"","content":"<div class=\"odoc-spec\"><div class=\"spec module anchored\" id=\"module-A\"><a href=\"#module-A\" class=\"anchor\"></a><code><span><span class=\"keyword\">module</span> <a href=\"A/index.html\">A</a></span><span> : <span class=\"keyword\">sig</span> ... <span class=\"keyword\">end</span></span></code></div></div>","resources":[],"assets":[]} 22 23 $ cat html/Main/A/index.html.json 24 + {"header":"<h1>Module <code><span>Main.A</span></code></h1>","type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"Index","href":"../../index.html","kind":"leaf-page"},{"name":"Main","href":"../index.html","kind":"module"},{"name":"A","href":"#","kind":"module"}],"toc":[],"source_anchor":null,"preamble":"","content":"<div class=\"odoc-spec\"><div class=\"spec module anchored\" id=\"module-B\"><a href=\"#module-B\" class=\"anchor\"></a><code><span><span class=\"keyword\">module</span> <a href=\"B/index.html\">B</a></span><span> : <span class=\"keyword\">sig</span> ... <span class=\"keyword\">end</span></span></code></div></div>","resources":[],"assets":[]} 25 26 $ cat html/Main/A/B/index.html.json 27 + {"header":"<h1>Module <code><span>A.B</span></code></h1>","type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"Index","href":"../../../index.html","kind":"leaf-page"},{"name":"Main","href":"../../index.html","kind":"module"},{"name":"A","href":"../index.html","kind":"module"},{"name":"B","href":"#","kind":"module"}],"toc":[],"source_anchor":null,"preamble":"","content":"","resources":[],"assets":[]}
+4 -4
test/integration/json_expansion_with_sources.t/run.t
··· 38 $ odoc html-generate --as-json -o html main.odocl 39 40 $ cat html/Main/index.html.json 41 - {"header":"<h1>Module <code><span>Main</span></code><a href=\"../src/main.ml.html\" class=\"source_link\">Source</a></h1>","type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"Index","href":"../index.html","kind":"leaf-page"},{"name":"Main","href":"#","kind":"module"}],"toc":[],"source_anchor":"../src/main.ml.html","preamble":"","content":"<div class=\"odoc-spec\"><div class=\"spec module anchored\" id=\"module-A\"><a href=\"#module-A\" class=\"anchor\"></a><a href=\"../src/a.ml.html\" class=\"source_link\">Source</a><code><span><span class=\"keyword\">module</span> <a href=\"A/index.html\">A</a></span><span> : <span class=\"keyword\">sig</span> ... <span class=\"keyword\">end</span></span></code></div></div>"} 42 43 $ cat html/Main/A/index.html.json 44 - {"header":"<h1>Module <code><span>Main.A</span></code><a href=\"../../src/a.ml.html\" class=\"source_link\">Source</a></h1>","type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"Index","href":"../../index.html","kind":"leaf-page"},{"name":"Main","href":"../index.html","kind":"module"},{"name":"A","href":"#","kind":"module"}],"toc":[],"source_anchor":"../../src/a.ml.html","preamble":"","content":"<div class=\"odoc-spec\"><div class=\"spec module anchored\" id=\"module-B\"><a href=\"#module-B\" class=\"anchor\"></a><a href=\"../../src/a.ml.html#module-B\" class=\"source_link\">Source</a><code><span><span class=\"keyword\">module</span> <a href=\"B/index.html\">B</a></span><span> : <span class=\"keyword\">sig</span> ... <span class=\"keyword\">end</span></span></code></div></div>"} 45 46 $ cat html/Main/A/B/index.html.json 47 - {"header":"<h1>Module <code><span>A.B</span></code><a href=\"../../../src/a.ml.html#module-B\" class=\"source_link\">Source</a></h1>","type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"Index","href":"../../../index.html","kind":"leaf-page"},{"name":"Main","href":"../../index.html","kind":"module"},{"name":"A","href":"../index.html","kind":"module"},{"name":"B","href":"#","kind":"module"}],"toc":[],"source_anchor":"../../../src/a.ml.html#module-B","preamble":"","content":""} 48 49 $ cat html/src/a.ml.html.json 50 - {"type":"source","breadcrumbs":[{"name":"Index","href":"../index.html","kind":"leaf-page"},{"name":"src","href":"index.html","kind":"page"},{"name":"a.ml","href":"#","kind":"source"}],"global_toc":null,"header":"<h1>Source file <code><span>a.ml</span></code></h1>","content":"<pre class=\"source_container\"><code class=\"source_line_column\"><a id=\"L1\" class=\"source_line\" href=\"#L1\">1</a>\u000A</code><code class=\"source_code\"><span><span id=\"module-B\"><span class=\"MODULE\">module</span> <span class=\"UIDENT\">B</span> <span class=\"EQUAL\">=</span> <span class=\"STRUCT\">struct</span> <span class=\"END\">end</span></span><span class=\"EOL\">\u000A</span></span></code></pre>"}
··· 38 $ odoc html-generate --as-json -o html main.odocl 39 40 $ cat html/Main/index.html.json 41 + {"header":"<h1>Module <code><span>Main</span></code><a href=\"../src/main.ml.html\" class=\"source_link\">Source</a></h1>","type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"Index","href":"../index.html","kind":"leaf-page"},{"name":"Main","href":"#","kind":"module"}],"toc":[],"source_anchor":"../src/main.ml.html","preamble":"","content":"<div class=\"odoc-spec\"><div class=\"spec module anchored\" id=\"module-A\"><a href=\"#module-A\" class=\"anchor\"></a><a href=\"../src/a.ml.html\" class=\"source_link\">Source</a><code><span><span class=\"keyword\">module</span> <a href=\"A/index.html\">A</a></span><span> : <span class=\"keyword\">sig</span> ... <span class=\"keyword\">end</span></span></code></div></div>","resources":[],"assets":[]} 42 43 $ cat html/Main/A/index.html.json 44 + {"header":"<h1>Module <code><span>Main.A</span></code><a href=\"../../src/a.ml.html\" class=\"source_link\">Source</a></h1>","type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"Index","href":"../../index.html","kind":"leaf-page"},{"name":"Main","href":"../index.html","kind":"module"},{"name":"A","href":"#","kind":"module"}],"toc":[],"source_anchor":"../../src/a.ml.html","preamble":"","content":"<div class=\"odoc-spec\"><div class=\"spec module anchored\" id=\"module-B\"><a href=\"#module-B\" class=\"anchor\"></a><a href=\"../../src/a.ml.html#module-B\" class=\"source_link\">Source</a><code><span><span class=\"keyword\">module</span> <a href=\"B/index.html\">B</a></span><span> : <span class=\"keyword\">sig</span> ... <span class=\"keyword\">end</span></span></code></div></div>","resources":[],"assets":[]} 45 46 $ cat html/Main/A/B/index.html.json 47 + {"header":"<h1>Module <code><span>A.B</span></code><a href=\"../../../src/a.ml.html#module-B\" class=\"source_link\">Source</a></h1>","type":"documentation","uses_katex":false,"breadcrumbs":[{"name":"Index","href":"../../../index.html","kind":"leaf-page"},{"name":"Main","href":"../../index.html","kind":"module"},{"name":"A","href":"../index.html","kind":"module"},{"name":"B","href":"#","kind":"module"}],"toc":[],"source_anchor":"../../../src/a.ml.html#module-B","preamble":"","content":"","resources":[],"assets":[]} 48 49 $ cat html/src/a.ml.html.json 50 + {"type":"source","breadcrumbs":[{"name":"Index","href":"../index.html","kind":"leaf-page"},{"name":"src","href":"index.html","kind":"page"},{"name":"a.ml","href":"#","kind":"source"}],"global_toc":null,"header":"<h1>Source file <code><span>a.ml</span></code></h1>","content":"<pre class=\"source_container\"><code class=\"source_line_column\"><a id=\"L1\" class=\"source_line\" href=\"#L1\">1</a>\u000A</code><code class=\"source_code\"><span><span class=\"MODULE\"><span id=\"module-B\"></span>module</span> <span class=\"UIDENT\">B</span> <span class=\"EQUAL\">=</span> <span class=\"STRUCT\">struct</span> <span class=\"END\">end</span><span class=\"EOL\">\u000A</span></span></code></pre>"}
+12 -20
test/integration/markdown-with-belt.t/run.t
··· 28 29 For higher order functions, it will be suffixed **U** if it takes uncurried callback. 30 31 - ```ocaml 32 - val forEach : 'a t -> ('a -> unit) -> unit 33 - val forEachU : 'a t -> ('a -> unit [\@u]) -> unit 34 - ``` 35 In general, uncurried version will be faster, but it may be less familiar to people who have a background in functional programming. 36 37 **A special encoding for collection safety** ··· 40 41 The original OCaml stdlib solved the problem using *functor* which creates a big closure at runtime and makes dead code elimination much harder. We use a phantom type to solve the problem: 42 43 - ```ocaml 44 - module Comparable1 = Belt.Id.MakeComparable (struct 45 type t = int * int 46 let cmp (a0, a1) (b0, b1) = 47 match Pervasives.compare a0 b0 with 48 - | 0 -> Pervasives.compare a1 b1 49 - | c -> c 50 end) 51 52 let mySet1 = Belt.Set.make ~id:(module Comparable1) ··· 55 type t = int * int 56 let cmp (a0, a1) (b0, b1) = 57 match Pervasives.compare a0 b0 with 58 - | 0 -> Pervasives.compare a1 b1 59 - | c -> c 60 end) 61 62 - let mySet2 = Belt.Set.make ~id:(module Comparable2) 63 - ``` 64 Here, the compiler would infer `mySet1` and `mySet2` having different type, so e.g. a \`merge\` operation that tries to merge these two sets will correctly fail. 65 66 - ```ocaml 67 - val mySet1 : (int * int, Comparable1.identity) t 68 - val mySet2 : (int * int, Comparable2.identity) t 69 - ``` 70 `Comparable1.identity` and `Comparable2.identity` are not the same using our encoding scheme. 71 72 **Collection Hierarchy** 73 74 In general, we provide a generic collection module, but also create specialized modules for commonly used data type. Take *Belt.Set* for example, we provide: 75 76 - ```ocaml 77 - Belt.Set 78 Belt.Set.Int 79 - Belt.Set.String 80 - ``` 81 The specialized modules *Belt.Set.Int*, *Belt.Set.String* are in general more efficient. 82 83 Currently, both *Belt\_Set* and *Belt.Set* are accessible to users for some technical reasons, we **strongly recommend** users stick to qualified import, *Belt.Set*, we may hide the internal, *i.e*, *Belt\_Set* in the future
··· 28 29 For higher order functions, it will be suffixed **U** if it takes uncurried callback. 30 31 + <x-ocaml mode="interactive"> val forEach : 'a t -&gt; ('a -&gt; unit) -&gt; unit 32 + val forEachU : 'a t -&gt; ('a -&gt; unit [\@u]) -&gt; unit</x-ocaml> 33 In general, uncurried version will be faster, but it may be less familiar to people who have a background in functional programming. 34 35 **A special encoding for collection safety** ··· 38 39 The original OCaml stdlib solved the problem using *functor* which creates a big closure at runtime and makes dead code elimination much harder. We use a phantom type to solve the problem: 40 41 + <x-ocaml mode="interactive"> module Comparable1 = Belt.Id.MakeComparable (struct 42 type t = int * int 43 let cmp (a0, a1) (b0, b1) = 44 match Pervasives.compare a0 b0 with 45 + | 0 -&gt; Pervasives.compare a1 b1 46 + | c -&gt; c 47 end) 48 49 let mySet1 = Belt.Set.make ~id:(module Comparable1) ··· 52 type t = int * int 53 let cmp (a0, a1) (b0, b1) = 54 match Pervasives.compare a0 b0 with 55 + | 0 -&gt; Pervasives.compare a1 b1 56 + | c -&gt; c 57 end) 58 59 + let mySet2 = Belt.Set.make ~id:(module Comparable2)</x-ocaml> 60 Here, the compiler would infer `mySet1` and `mySet2` having different type, so e.g. a \`merge\` operation that tries to merge these two sets will correctly fail. 61 62 + <x-ocaml mode="interactive"> val mySet1 : (int * int, Comparable1.identity) t 63 + val mySet2 : (int * int, Comparable2.identity) t</x-ocaml> 64 `Comparable1.identity` and `Comparable2.identity` are not the same using our encoding scheme. 65 66 **Collection Hierarchy** 67 68 In general, we provide a generic collection module, but also create specialized modules for commonly used data type. Take *Belt.Set* for example, we provide: 69 70 + <x-ocaml mode="interactive"> Belt.Set 71 Belt.Set.Int 72 + Belt.Set.String</x-ocaml> 73 The specialized modules *Belt.Set.Int*, *Belt.Set.String* are in general more efficient. 74 75 Currently, both *Belt\_Set* and *Belt.Set* are accessible to users for some technical reasons, we **strongly recommend** users stick to qualified import, *Belt.Set*, we may hide the internal, *i.e*, *Belt\_Set* in the future
+1 -5
test/integration/markdown.t/run.t
··· 8 Warning: '{{!...} ...}' (cross-reference) should not be empty. 9 File "page.mld", line 35, characters 49-59: 10 Warning: '{{!...} ...}' (cross-reference) should not be empty. 11 - File "page.mld", line 125, characters 0-11: 12 - Warning: Tags are not allowed in pages. 13 $ odoc compile --package test test.cmti 14 $ odoc compile --package test -I . test2.cmti 15 $ odoc compile --package list -I . list.cmti ··· 155 156 Inline `code`. 157 158 - ```ocaml 159 - let _ = "Block code" 160 - ``` 161 ```text 162 Code block with {[inner code block syntax]} 163 ```
··· 8 Warning: '{{!...} ...}' (cross-reference) should not be empty. 9 File "page.mld", line 35, characters 49-59: 10 Warning: '{{!...} ...}' (cross-reference) should not be empty. 11 $ odoc compile --package test test.cmti 12 $ odoc compile --package test -I . test2.cmti 13 $ odoc compile --package list -I . list.cmti ··· 153 154 Inline `code`. 155 156 + <x-ocaml mode="interactive">let _ = &quot;Block code&quot;</x-ocaml> 157 ```text 158 Code block with {[inner code block syntax]} 159 ```
+3 -3
test/model/semantics/test.ml
··· 769 let followed_by_code_block = 770 test "@author Foo\n{[bar]}"; 771 [%expect 772 - {| {"value":[{"`Tag":{"`Author":"Foo"}},{"`Code_block":["None","bar"]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}] 773 774 let followed_by_verbatim = 775 test "@author Foo\n{v bar v}"; ··· 906 let in_code_block = 907 test "{[@author Foo]}"; 908 [%expect 909 - {| {"value":[{"`Code_block":["None","@author Foo"]}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}] 910 911 let in_verbatim = 912 test "{v @author Foo v}"; ··· 917 let after_code_block = 918 test "{[foo]} @author Bar"; 919 [%expect 920 - {| {"value":[{"`Code_block":["None","foo"]},{"`Tag":{"`Author":"Bar"}}],"warnings":["File \"f.ml\", line 1, characters 8-19:\n'@author' should begin on its own line.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}] 921 922 let after_verbatim = 923 test "{v foo v} @author Bar";
··· 769 let followed_by_code_block = 770 test "@author Foo\n{[bar]}"; 771 [%expect 772 + {| {"value":[{"`Tag":{"`Author":"Foo"}},{"`Code_block":{"meta":"None","delimiter":"None","content":"bar","output":"None"}}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}] 773 774 let followed_by_verbatim = 775 test "@author Foo\n{v bar v}"; ··· 906 let in_code_block = 907 test "{[@author Foo]}"; 908 [%expect 909 + {| {"value":[{"`Code_block":{"meta":"None","delimiter":"None","content":"@author Foo","output":"None"}}],"warnings":["File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}] 910 911 let in_verbatim = 912 test "{v @author Foo v}"; ··· 917 let after_code_block = 918 test "{[foo]} @author Bar"; 919 [%expect 920 + {| {"value":[{"`Code_block":{"meta":"None","delimiter":"None","content":"foo","output":"None"}},{"`Tag":{"`Author":"Bar"}}],"warnings":["File \"f.ml\", line 1, characters 8-19:\n'@author' should begin on its own line.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading.","File \"f.ml.mld\":\nPages (.mld files) should start with a heading."]} |}] 921 922 let after_verbatim = 923 test "{v foo v} @author Bar";
+11
test/pages/resolution.t/run.t
··· 97 98 $ odoc support-files -o html 99 $ find html -type f | sort 100 html/fonts/KaTeX_AMS-Regular.woff2 101 html/fonts/KaTeX_Caligraphic-Bold.woff2 102 html/fonts/KaTeX_Caligraphic-Regular.woff2
··· 97 98 $ odoc support-files -o html 99 $ find html -type f | sort 100 + html/extensions/admonition.css 101 + html/extensions/docsite.css 102 + html/extensions/docsite.js 103 + html/extensions/dot.css 104 + html/extensions/mermaid.css 105 + html/extensions/msc.css 106 + html/extensions/rfc.css 107 + html/extensions/scrollycode-dark.css 108 + html/extensions/scrollycode-notebook.css 109 + html/extensions/scrollycode-warm.css 110 + html/extensions/scrollycode.css 111 html/fonts/KaTeX_AMS-Regular.woff2 112 html/fonts/KaTeX_Caligraphic-Bold.woff2 113 html/fonts/KaTeX_Caligraphic-Regular.woff2
+4 -4
test/search/html_search.t/run.t
··· 83 {"id":[{"kind":"Root","name":"Main"},{"kind":"Type","name":"tdzdz"},{"kind":"Constructor","name":"B"}],"doc":"Bliiiiiiiiiii","kind":{"kind":"Constructor","args":{"kind":"Tuple","vals":["int list","int"]},"res":"tdzdz"},"display":{"url":"page/Main/index.html#type-tdzdz.B","html":"<code class=\"entry-kind\">cons</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.tdzdz.</span><span class=\"entry-name\">B</span><code class=\"entry-rhs\"> : int list * int -&gt; tdzdz</code></code><div class=\"entry-comment\"><div><p>Bliiiiiiiiiii</p></div></div>"}} 84 {"id":[{"kind":"Root","name":"J"}],"doc":"a paragraph two","kind":{"kind":"Doc"},"display":{"url":"page/J/index.html","html":"<code class=\"entry-kind\">doc</code><code class=\"entry-title\"><span class=\"entry-name\">J</span></code><div class=\"entry-comment\"><div><p>a paragraph two</p></div></div>"}} 85 {"id":[{"kind":"Root","name":"Main"}],"doc":"a paragraph two","kind":{"kind":"Doc"},"display":{"url":"page/Main/index.html","html":"<code class=\"entry-kind\">doc</code><code class=\"entry-title\"><span class=\"entry-name\">Main</span></code><div class=\"entry-comment\"><div><p>a paragraph two</p></div></div>"}} 86 - {"id":[{"kind":"Root","name":"Main"}],"doc":"a paragraph\nand another\nverbatim\nx + 1\nblibli","kind":{"kind":"Doc"},"display":{"url":"page/Main/index.html","html":"<code class=\"entry-kind\">doc</code><code class=\"entry-title\"><span class=\"entry-name\">Main</span></code><div class=\"entry-comment\"><div><p>a paragraph</p><p>and another</p><pre>verbatim</pre><p><code class=\"odoc-katex-math\">x + 1</code></p><pre class=\"language-ocaml\"><code>blibli</code></pre></div></div>"}} 87 {"id":[{"kind":"Root","name":"Main"}],"doc":"this is a title\nand this is a paragraph","kind":{"kind":"Doc"},"display":{"url":"page/Main/index.html","html":"<code class=\"entry-kind\">doc</code><code class=\"entry-title\"><span class=\"entry-name\">Main</span></code><div class=\"entry-comment\"><div><p>this is a title</p><p>and this is a paragraph</p></div></div>"}} 88 - {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"I"}],"doc":"a paragraph\nand another\nverbatim\nx + 1\nblibli","kind":{"kind":"Doc"},"display":{"url":"page/Main/I/index.html","html":"<code class=\"entry-kind\">doc</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">I</span></code><div class=\"entry-comment\"><div><p>a paragraph</p><p>and another</p><pre>verbatim</pre><p><code class=\"odoc-katex-math\">x + 1</code></p><pre class=\"language-ocaml\"><code>blibli</code></pre></div></div>"}} 89 {"id":[{"kind":"Root","name":"J"}],"doc":"a paragraph one","kind":{"kind":"Module"},"display":{"url":"page/J/index.html","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"entry-name\">J</span></code><div class=\"entry-comment\"><div><p>a paragraph one</p></div></div>"}} 90 {"id":[{"kind":"Root","name":"Main"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"page/Main/index.html","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"entry-name\">Main</span></code><div class=\"entry-comment\"><div></div></div>"}} 91 {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"I"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"page/Main/index.html#module-I","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">I</span></code><div class=\"entry-comment\"><div></div></div>"}} 92 {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"M"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"page/Main/index.html#module-M","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">M</span></code><div class=\"entry-comment\"><div></div></div>"}} 93 {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"X"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"page/Main/index.html#module-X","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">X</span></code><div class=\"entry-comment\"><div></div></div>"}} 94 - {"id":[{"kind":"Page","name":"page"}],"doc":"A title\nA paragraph\nsome verbatim\nand code\na list of things bliblib","kind":{"kind":"Page"},"display":{"url":"page/index.html","html":"<code class=\"entry-kind\">page</code><code class=\"entry-title\"><span class=\"entry-name\">page</span></code><div class=\"entry-comment\"><div><p>A title</p><p>A paragraph</p><pre>some verbatim</pre><pre class=\"language-ocaml\"><code>and code</code></pre><ul><li>a list <em>of</em> things</li><li>bliblib</li></ul></div></div>"}} 95 {"id":[{"kind":"Root","name":"Main"},{"kind":"Type","name":"t"}],"doc":"A comment","kind":{"kind":"TypeDecl","private":false,"manifest":"int","constraints":[]},"display":{"url":"page/Main/index.html#type-t","html":"<code class=\"entry-kind\">type</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">t</span><code class=\"entry-rhs\"> = int</code></code><div class=\"entry-comment\"><div><p>A comment</p></div></div>"}} 96 {"id":[{"kind":"Root","name":"Main"},{"kind":"Type","name":"tdzdz"}],"doc":"A comment aaaaaaaaaa","kind":{"kind":"TypeDecl","private":false,"manifest":null,"constraints":[]},"display":{"url":"page/Main/index.html#type-tdzdz","html":"<code class=\"entry-kind\">type</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">tdzdz</span><code class=\"entry-rhs\"> = A of int * int | B of int list * int</code></code><div class=\"entry-comment\"><div><p>A comment aaaaaaaaaa</p></div></div>"}} 97 {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"M"},{"kind":"Type","name":"t"}],"doc":"dsdsd","kind":{"kind":"TypeDecl","private":false,"manifest":null,"constraints":[]},"display":{"url":"page/Main/M/index.html#type-t","html":"<code class=\"entry-kind\">type</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.M.</span><span class=\"entry-name\">t</span></code><div class=\"entry-comment\"><div><p>dsdsd</p></div></div>"}} ··· 101 {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"lorem4"}],"doc":"lorem 4","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-lorem4","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">lorem4</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div><p>lorem 4</p></div></div>"}} 102 {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"lorem"}],"doc":"lorem 1 and a link","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-lorem","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">lorem</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div><p>lorem 1 and a <span>link</span></p></div></div>"}} 103 {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"uu"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-uu","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">uu</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"}} 104 - {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"v"}],"doc":"a reference , and some formatted content with code and\n code blocks","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-v","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">v</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div><p>a reference <span><code>t</code></span>, and some <em>formatted</em> <b>content</b> with <code>code</code> and</p><pre class=\"language-ocaml\"><code> code blocks</code></pre></div></div>"}} 105 {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"x"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-x","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">x</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"}} 106 {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"y"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-y","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">y</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"}} 107 {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"I"},{"kind":"Value","name":"x"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/I/index.html#val-x","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.I.</span><span class=\"entry-name\">x</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"}}
··· 83 {"id":[{"kind":"Root","name":"Main"},{"kind":"Type","name":"tdzdz"},{"kind":"Constructor","name":"B"}],"doc":"Bliiiiiiiiiii","kind":{"kind":"Constructor","args":{"kind":"Tuple","vals":["int list","int"]},"res":"tdzdz"},"display":{"url":"page/Main/index.html#type-tdzdz.B","html":"<code class=\"entry-kind\">cons</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.tdzdz.</span><span class=\"entry-name\">B</span><code class=\"entry-rhs\"> : int list * int -&gt; tdzdz</code></code><div class=\"entry-comment\"><div><p>Bliiiiiiiiiii</p></div></div>"}} 84 {"id":[{"kind":"Root","name":"J"}],"doc":"a paragraph two","kind":{"kind":"Doc"},"display":{"url":"page/J/index.html","html":"<code class=\"entry-kind\">doc</code><code class=\"entry-title\"><span class=\"entry-name\">J</span></code><div class=\"entry-comment\"><div><p>a paragraph two</p></div></div>"}} 85 {"id":[{"kind":"Root","name":"Main"}],"doc":"a paragraph two","kind":{"kind":"Doc"},"display":{"url":"page/Main/index.html","html":"<code class=\"entry-kind\">doc</code><code class=\"entry-title\"><span class=\"entry-name\">Main</span></code><div class=\"entry-comment\"><div><p>a paragraph two</p></div></div>"}} 86 + {"id":[{"kind":"Root","name":"Main"}],"doc":"a paragraph\nand another\nverbatim\nx + 1\nblibli","kind":{"kind":"Doc"},"display":{"url":"page/Main/index.html","html":"<code class=\"entry-kind\">doc</code><code class=\"entry-title\"><span class=\"entry-name\">Main</span></code><div class=\"entry-comment\"><div><p>a paragraph</p><p>and another</p><pre>verbatim</pre><p><code class=\"odoc-katex-math\">x + 1</code></p><x-ocaml mode=\"interactive\">blibli</x-ocaml></div></div>"}} 87 {"id":[{"kind":"Root","name":"Main"}],"doc":"this is a title\nand this is a paragraph","kind":{"kind":"Doc"},"display":{"url":"page/Main/index.html","html":"<code class=\"entry-kind\">doc</code><code class=\"entry-title\"><span class=\"entry-name\">Main</span></code><div class=\"entry-comment\"><div><p>this is a title</p><p>and this is a paragraph</p></div></div>"}} 88 + {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"I"}],"doc":"a paragraph\nand another\nverbatim\nx + 1\nblibli","kind":{"kind":"Doc"},"display":{"url":"page/Main/I/index.html","html":"<code class=\"entry-kind\">doc</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">I</span></code><div class=\"entry-comment\"><div><p>a paragraph</p><p>and another</p><pre>verbatim</pre><p><code class=\"odoc-katex-math\">x + 1</code></p><x-ocaml mode=\"interactive\">blibli</x-ocaml></div></div>"}} 89 {"id":[{"kind":"Root","name":"J"}],"doc":"a paragraph one","kind":{"kind":"Module"},"display":{"url":"page/J/index.html","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"entry-name\">J</span></code><div class=\"entry-comment\"><div><p>a paragraph one</p></div></div>"}} 90 {"id":[{"kind":"Root","name":"Main"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"page/Main/index.html","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"entry-name\">Main</span></code><div class=\"entry-comment\"><div></div></div>"}} 91 {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"I"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"page/Main/index.html#module-I","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">I</span></code><div class=\"entry-comment\"><div></div></div>"}} 92 {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"M"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"page/Main/index.html#module-M","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">M</span></code><div class=\"entry-comment\"><div></div></div>"}} 93 {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"X"}],"doc":"","kind":{"kind":"Module"},"display":{"url":"page/Main/index.html#module-X","html":"<code class=\"entry-kind\">mod</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">X</span></code><div class=\"entry-comment\"><div></div></div>"}} 94 + {"id":[{"kind":"Page","name":"page"}],"doc":"A title\nA paragraph\nsome verbatim\nand code\na list of things bliblib","kind":{"kind":"Page"},"display":{"url":"page/index.html","html":"<code class=\"entry-kind\">page</code><code class=\"entry-title\"><span class=\"entry-name\">page</span></code><div class=\"entry-comment\"><div><p>A title</p><p>A paragraph</p><pre>some verbatim</pre><x-ocaml mode=\"interactive\">and code</x-ocaml><ul><li>a list <em>of</em> things</li><li>bliblib</li></ul></div></div>"}} 95 {"id":[{"kind":"Root","name":"Main"},{"kind":"Type","name":"t"}],"doc":"A comment","kind":{"kind":"TypeDecl","private":false,"manifest":"int","constraints":[]},"display":{"url":"page/Main/index.html#type-t","html":"<code class=\"entry-kind\">type</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">t</span><code class=\"entry-rhs\"> = int</code></code><div class=\"entry-comment\"><div><p>A comment</p></div></div>"}} 96 {"id":[{"kind":"Root","name":"Main"},{"kind":"Type","name":"tdzdz"}],"doc":"A comment aaaaaaaaaa","kind":{"kind":"TypeDecl","private":false,"manifest":null,"constraints":[]},"display":{"url":"page/Main/index.html#type-tdzdz","html":"<code class=\"entry-kind\">type</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">tdzdz</span><code class=\"entry-rhs\"> = A of int * int | B of int list * int</code></code><div class=\"entry-comment\"><div><p>A comment aaaaaaaaaa</p></div></div>"}} 97 {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"M"},{"kind":"Type","name":"t"}],"doc":"dsdsd","kind":{"kind":"TypeDecl","private":false,"manifest":null,"constraints":[]},"display":{"url":"page/Main/M/index.html#type-t","html":"<code class=\"entry-kind\">type</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.M.</span><span class=\"entry-name\">t</span></code><div class=\"entry-comment\"><div><p>dsdsd</p></div></div>"}} ··· 101 {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"lorem4"}],"doc":"lorem 4","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-lorem4","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">lorem4</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div><p>lorem 4</p></div></div>"}} 102 {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"lorem"}],"doc":"lorem 1 and a link","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-lorem","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">lorem</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div><p>lorem 1 and a <span>link</span></p></div></div>"}} 103 {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"uu"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-uu","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">uu</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"}} 104 + {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"v"}],"doc":"a reference , and some formatted content with code and\n code blocks","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-v","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">v</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div><p>a reference <span><code>t</code></span>, and some <em>formatted</em> <b>content</b> with <code>code</code> and</p><x-ocaml mode=\"interactive\"> code blocks</x-ocaml></div></div>"}} 105 {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"x"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-x","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">x</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"}} 106 {"id":[{"kind":"Root","name":"Main"},{"kind":"Value","name":"y"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/index.html#val-y","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.</span><span class=\"entry-name\">y</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"}} 107 {"id":[{"kind":"Root","name":"Main"},{"kind":"Module","name":"I"},{"kind":"Value","name":"x"}],"doc":"","kind":{"kind":"Value","type":"int"},"display":{"url":"page/Main/I/index.html#val-x","html":"<code class=\"entry-kind\">val</code><code class=\"entry-title\"><span class=\"prefix-name\">Main.I.</span><span class=\"entry-name\">x</span><code class=\"entry-rhs\"> : int</code></code><div class=\"entry-comment\"><div></div></div>"}}
+41 -31
test/xref2/classes.t/run.t
··· 51 [] 52 ] 53 }, 54 - "value": "Abstract" 55 } 56 $ odoc_print e.odoc -r g | jq . 57 { ··· 91 [] 92 ] 93 }, 94 - "value": "Abstract" 95 } 96 $ odoc_print e.odoc -r d | jq '.expr.Signature.items[1].Method.type_' 97 { ··· 118 $ odoc_print c.odoc -r g | jq '.type_' 119 { 120 "Arrow": [ 121 - "None", 122 - { 123 - "Class": [ 124 - { 125 - "`Resolved": { 126 - "`ClassType": [ 127 - { 128 - "`Identifier": { 129 - "`Root": [ 130 - "None", 131 - "B" 132 - ] 133 - } 134 - }, 135 - "u" 136 - ] 137 - } 138 - }, 139 - [] 140 - ] 141 - }, 142 - { 143 - "Constr": [ 144 - { 145 - "`Resolved": { 146 - "`CoreType": "unit" 147 - } 148 - }, 149 [] 150 ] 151 - } 152 ] 153 } 154
··· 51 [] 52 ] 53 }, 54 + "value": "Abstract", 55 + "modalities": [] 56 } 57 $ odoc_print e.odoc -r g | jq . 58 { ··· 92 [] 93 ] 94 }, 95 + "value": "Abstract", 96 + "modalities": [] 97 } 98 $ odoc_print e.odoc -r d | jq '.expr.Signature.items[1].Method.type_' 99 { ··· 120 $ odoc_print c.odoc -r g | jq '.type_' 121 { 122 "Arrow": [ 123 + [ 124 + "None", 125 + { 126 + "Class": [ 127 + { 128 + "`Resolved": { 129 + "`ClassType": [ 130 + { 131 + "`Identifier": { 132 + "`Root": [ 133 + "None", 134 + "B" 135 + ] 136 + } 137 + }, 138 + "u" 139 + ] 140 + } 141 + }, 142 + [] 143 + ] 144 + } 145 + ], 146 + [ 147 + { 148 + "Constr": [ 149 + { 150 + "`Resolved": { 151 + "`CoreType": "unit" 152 + } 153 + }, 154 + [] 155 + ] 156 + }, 157 + [ 158 + [], 159 [] 160 ] 161 + ] 162 ] 163 } 164
+46 -30
test/xref2/github_issue_1001.t/run.t
··· 13 "doc": { "elements": [], "warnings_tag": "None" }, 14 "type_": { 15 "Arrow": [ 16 - { "Some": { "Optional": "optional" } }, 17 - { "Constr": [ { "`Resolved": { "`CoreType": "int" } }, [] ] }, 18 - { 19 - "Arrow": [ 20 - "None", 21 - { "Constr": [ { "`Resolved": { "`CoreType": "unit" } }, [] ] }, 22 - { "Var": "a" } 23 - ] 24 - } 25 ] 26 }, 27 - "value": "Abstract" 28 } 29 30 Harder case contains a "RawOptional": ··· 36 "doc": { "elements": [], "warnings_tag": "None" }, 37 "type_": { 38 "Arrow": [ 39 - { "Some": { "RawOptional": "optional" } }, 40 - { 41 - "Constr": [ 42 - { 43 - "`Resolved": { 44 - "`Identifier": { 45 - "`Type": [ { "`Root": [ "None", "Test" ] }, "hard" ] 46 } 47 - } 48 - }, 49 - [] 50 - ] 51 - }, 52 - { 53 - "Arrow": [ 54 - "None", 55 - { "Constr": [ { "`Resolved": { "`CoreType": "unit" } }, [] ] }, 56 - { "Var": "a" } 57 - ] 58 - } 59 ] 60 }, 61 - "value": "Abstract" 62 }
··· 13 "doc": { "elements": [], "warnings_tag": "None" }, 14 "type_": { 15 "Arrow": [ 16 + [ 17 + { "Some": { "Optional": "optional" } }, 18 + { "Constr": [ { "`Resolved": { "`CoreType": "int" } }, [] ] } 19 + ], 20 + [ 21 + { 22 + "Arrow": [ 23 + [ 24 + "None", 25 + { "Constr": [ { "`Resolved": { "`CoreType": "unit" } }, [] ] } 26 + ], 27 + [ { "Var": [ "a", "None" ] }, [ [], [] ] ] 28 + ] 29 + }, 30 + [ [], [] ] 31 + ] 32 ] 33 }, 34 + "value": "Abstract", 35 + "modalities": [] 36 } 37 38 Harder case contains a "RawOptional": ··· 44 "doc": { "elements": [], "warnings_tag": "None" }, 45 "type_": { 46 "Arrow": [ 47 + [ 48 + { "Some": { "RawOptional": "optional" } }, 49 + { 50 + "Constr": [ 51 + { 52 + "`Resolved": { 53 + "`Identifier": { 54 + "`Type": [ { "`Root": [ "None", "Test" ] }, "hard" ] 55 + } 56 } 57 + }, 58 + [] 59 + ] 60 + } 61 + ], 62 + [ 63 + { 64 + "Arrow": [ 65 + [ 66 + "None", 67 + { "Constr": [ { "`Resolved": { "`CoreType": "unit" } }, [] ] } 68 + ], 69 + [ { "Var": [ "a", "None" ] }, [ [], [] ] ] 70 + ] 71 + }, 72 + [ [], [] ] 73 + ] 74 ] 75 }, 76 + "value": "Abstract", 77 + "modalities": [] 78 }
+3 -2
test/xref2/github_issue_930.t/run.t
··· 31 concat function with simplified types (t -> t): 32 33 $ odoc_print test.odocl -r S0_with_creators_base.concat | jq -c '.type_.Arrow[1].Constr[0]' 34 - {"`Resolved":{"`Identifier":{"`Type":[{"`ModuleType":[{"`Root":["None","Test"]},"S0_with_creators_base"]},"t"]}}} 35 36 $ odoc_print test.odocl -r S0_with_creators_base.concat | jq -c '.type_.Arrow[2].Constr[0]' 37 - {"`Resolved":{"`Identifier":{"`Type":[{"`ModuleType":[{"`Root":["None","Test"]},"S0_with_creators_base"]},"t"]}}} 38 39 === Test 3: Deeply nested includes === 40
··· 31 concat function with simplified types (t -> t): 32 33 $ odoc_print test.odocl -r S0_with_creators_base.concat | jq -c '.type_.Arrow[1].Constr[0]' 34 + jq: error (at <stdin>:65): Cannot index array with string "Constr" 35 + [5] 36 37 $ odoc_print test.odocl -r S0_with_creators_base.concat | jq -c '.type_.Arrow[2].Constr[0]' 38 + null 39 40 === Test 3: Deeply nested includes === 41
+2 -1
test/xref2/hidden_modules.t/run.t
··· 154 [] 155 ] 156 }, 157 - "value": "Abstract" 158 } 159 160
··· 154 [] 155 ] 156 }, 157 + "value": "Abstract", 158 + "modalities": [] 159 } 160 161