Skip to content

Unnumbered lists of constructors for polyvariants and extensible variants #987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions src/document/generator.ml
Original file line number Diff line number Diff line change
Expand Up @@ -667,12 +667,12 @@ module Make (Syntax : SYNTAX) = struct
let kind_approx, cstr, doc =
match item with
| Odoc_model.Lang.TypeExpr.Polymorphic_variant.Type te ->
("unknown", O.code (type_expr te), None)
("unknown", O.documentedSrc (type_expr te), None)
| Constructor { constant; name; arguments; doc; _ } -> (
let cstr = "`" ^ name in
( "constructor",
(match arguments with
| [] -> O.code (O.txt cstr)
| [] -> O.documentedSrc (O.txt cstr)
| _ ->
(* Multiple arguments in a polymorphic variant constructor correspond
to a conjunction of types, not a product: [`Lbl int&float].
Expand All @@ -694,7 +694,7 @@ module Make (Syntax : SYNTAX) = struct
let params =
if constant then O.txt "& " ++ params else params
in
O.code
O.documentedSrc
(O.txt cstr
++
if Syntax.Type.Variant.parenthesize_params then params
Expand All @@ -706,16 +706,16 @@ module Make (Syntax : SYNTAX) = struct
let url = Url.Anchor.polymorphic_variant ~type_ident item in
let attrs = [ "def"; Url.Anchor.string_of_kind url.kind ] in
let anchor = Some url in
let code = O.code (O.txt "| ") @ cstr in
let code = O.documentedSrc (O.txt "| ") @ cstr in
let doc = match doc with None -> [] | Some doc -> doc in
DocumentedSrc.Documented { attrs; anchor; code; doc; markers }
DocumentedSrc.Nested { attrs; anchor; code; doc; markers }
with Failure s ->
Printf.eprintf "ERROR: %s\n%!" s;
let code = O.code (O.txt "| ") @ cstr in
let code = O.documentedSrc (O.txt "| ") @ cstr in
let attrs = [ "def"; kind_approx ] in
let doc = [] in
let anchor = None in
DocumentedSrc.Documented { attrs; anchor; code; doc; markers }
DocumentedSrc.Nested { attrs; anchor; code; doc; markers }
in
let variants = List.map row t.elements in
let intro, ending =
Expand Down
8 changes: 4 additions & 4 deletions src/html_support_files/odoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -534,19 +534,19 @@ div.odoc-spec,.odoc-include {
margin-bottom: 2em;
}

.spec.type .variant p, .spec.type .record p {
.spec.type > ol > li p {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a fan of these "non semantic" selectors: I think they are more fragile than the previous one.
In my opinion it is better to add the variant class to extension constructors and polymorphic variants.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see how this is not semantic CSS.

It does look more "rigid" , tied to the specific shape of the markup -- but most things we want to do in CSS require that, and it's sensible to have a li selector when disabling list decorations.

Adding specific cases is fragile and would break if eg. effect declarations with lists of operations were added. IIRC the .variant classes were meant for anchors (links to definitions) and there is nothing to link to for polyvariants, they're structural.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see how this is not semantic CSS.

I meant that I think it is easier to understand "variants and records in specification of types are shown as ..." rather than "a direct ol child of li that is a direct child of ol are shown as ..."

However, I do agree with:

It does look more "rigid" , tied to the specific shape of the markup -- but most things we want to do in CSS require that, and it's sensible to have a li selector when disabling list decorations.

so maybe a good rule could be

Suggested change
.spec.type > ol > li p {
.spec.type > li.variant p, .spec.type > li.record p, {

Adding specific cases is fragile and would break if eg. effect declarations with lists of operations were added.

If effect declarations with list of declarations are added, we need to decide whether we want to show them exactly as we show variants, or differently, and add classes/rules accordingly. So we could say equivalently that .spec.type > ol > li would break if we want those effects to be displayed differently.

IIRC the .variant classes were meant for anchors (links to definitions) and there is nothing to link to for polyvariants, they're structural.

If I understand correctly what you say, no, the .variant classes were not meant for links to definition. Ids are used for that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I too prefer to have a more specific CSS rather than a too general one. I believe it helps maintenance by keeping the rules for various parts of the page separate.
The day a list is added to the documentation, we'll have a close look at how it renders and we'll tweak the CSS accordingly.

I also agree that it's not nice to set properties specific to li in a rule that is not restricted to li. I suggest keeping the previous rules as they were except for list-style, which would move into a new more constrained rule:

.spec.type li.variant, .spec.type li.record {
  list-style: none;
}

margin: 5px;
}

.spec.type .variant, .spec.type .record {
.spec.type > ol > li {
margin-left: 2ch;
list-style: none;
display: flex;
flex-wrap: wrap;
row-gap: 4px;
}

.spec.type .record > code, .spec.type .variant > code {
.spec.type > ol > li code {
min-width: 40%;
}

Expand All @@ -555,7 +555,7 @@ div.odoc-spec,.odoc-include {
margin-bottom: 0;
}

.spec.type .record > .def-doc, .spec.type .variant > .def-doc {
.spec.type .def-doc {
min-width:50%;
padding: 0.25em 0.5em;
margin-left: 10%;
Expand Down
18 changes: 9 additions & 9 deletions src/html_support_files/odoc_html_support_files.ml

Large diffs are not rendered by default.

32 changes: 14 additions & 18 deletions test/generators/html/Ocamlary.html
Original file line number Diff line number Diff line change
Expand Up @@ -1060,12 +1060,13 @@ <h4 id="advanced-type-stuff">
<ol>
<li id="type-poly_variant.TagA" class="def constructor anchored">
<a href="#type-poly_variant.TagA" class="anchor"></a>
<code><span>| </span></code><code><span>`TagA</span></code>
<code><span>| </span><span>`TagA</span></code>
</li>
<li id="type-poly_variant.ConstrB" class="def constructor anchored">
<a href="#type-poly_variant.ConstrB" class="anchor"></a>
<code><span>| </span></code>
<code><span>`ConstrB <span class="keyword">of</span> int</span></code>
<code><span>| </span>
<span>`ConstrB <span class="keyword">of</span> int</span>
</code>
</li>
</ol><code><span> ]</span></code>
</div>
Expand Down Expand Up @@ -1287,13 +1288,13 @@ <h4 id="advanced-type-stuff">
<ol>
<li id="type-poly_variant_union.poly_variant" class="def type anchored">
<a href="#type-poly_variant_union.poly_variant" class="anchor"></a>
<code><span>| </span></code>
<code><span><a href="#type-poly_variant">poly_variant</a></span>
<code><span>| </span>
<span><a href="#type-poly_variant">poly_variant</a></span>
</code>
</li>
<li id="type-poly_variant_union.TagC" class="def constructor anchored">
<a href="#type-poly_variant_union.TagC" class="anchor"></a>
<code><span>| </span></code><code><span>`TagC</span></code>
<code><span>| </span><span>`TagC</span></code>
</li>
</ol><code><span> ]</span></code>
</div>
Expand All @@ -1312,8 +1313,7 @@ <h4 id="advanced-type-stuff">
<ol>
<li id="type-poly_poly_variant.TagA" class="def constructor anchored">
<a href="#type-poly_poly_variant.TagA" class="anchor"></a>
<code><span>| </span></code>
<code>
<code><span>| </span>
<span>`TagA <span class="keyword">of</span>
<span class="type-var">'a</span>
</span>
Expand All @@ -1334,8 +1334,7 @@ <h4 id="advanced-type-stuff">
<li id="type-bin_poly_poly_variant.TagA" class="def constructor
anchored">
<a href="#type-bin_poly_poly_variant.TagA" class="anchor"></a>
<code><span>| </span></code>
<code>
<code><span>| </span>
<span>`TagA <span class="keyword">of</span>
<span class="type-var">'a</span>
</span>
Expand All @@ -1344,8 +1343,7 @@ <h4 id="advanced-type-stuff">
<li id="type-bin_poly_poly_variant.ConstrB" class="def constructor
anchored">
<a href="#type-bin_poly_poly_variant.ConstrB" class="anchor"></a>
<code><span>| </span></code>
<code>
<code><span>| </span>
<span>`ConstrB <span class="keyword">of</span>
<span class="type-var">'b</span>
</span>
Expand Down Expand Up @@ -1465,25 +1463,23 @@ <h4 id="advanced-type-stuff">
<ol>
<li id="type-nested_poly_variant.A" class="def constructor anchored">
<a href="#type-nested_poly_variant.A" class="anchor"></a>
<code><span>| </span></code><code><span>`A</span></code>
<code><span>| </span><span>`A</span></code>
</li>
<li id="type-nested_poly_variant.B" class="def constructor anchored">
<a href="#type-nested_poly_variant.B" class="anchor"></a>
<code><span>| </span></code>
<code>
<code><span>| </span>
<span>`B <span class="keyword">of</span>
<span>[ `B1 <span>| `B2</span> ]</span>
</span>
</code>
</li>
<li id="type-nested_poly_variant.C" class="def constructor anchored">
<a href="#type-nested_poly_variant.C" class="anchor"></a>
<code><span>| </span></code><code><span>`C</span></code>
<code><span>| </span><span>`C</span></code>
</li>
<li id="type-nested_poly_variant.D" class="def constructor anchored">
<a href="#type-nested_poly_variant.D" class="anchor"></a>
<code><span>| </span></code>
<code>
<code><span>| </span>
<span>`D <span class="keyword">of</span>
<span>[ <span>`D1 of <span>[ `D1a ]</span></span> ]</span>
</span>
Expand Down
8 changes: 4 additions & 4 deletions test/generators/html/Recent-module-type-PolyS.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ <h1>Module type <code><span>Recent.PolyS</span></code></h1>
</code>
<ol>
<li id="type-t.A" class="def constructor anchored">
<a href="#type-t.A" class="anchor"></a><code><span>| </span></code>
<code><span>`A</span></code>
<a href="#type-t.A" class="anchor"></a>
<code><span>| </span><span>`A</span></code>
</li>
<li id="type-t.B" class="def constructor anchored">
<a href="#type-t.B" class="anchor"></a><code><span>| </span></code>
<code><span>`B</span></code>
<a href="#type-t.B" class="anchor"></a>
<code><span>| </span><span>`B</span></code>
</li>
</ol><code><span> ]</span></code>
</div>
Expand Down
11 changes: 6 additions & 5 deletions test/generators/html/Recent.html
Original file line number Diff line number Diff line change
Expand Up @@ -151,23 +151,24 @@ <h1>Module <code><span>Recent</span></code></h1>
<ol>
<li id="type-polymorphic_variant.A" class="def constructor anchored">
<a href="#type-polymorphic_variant.A" class="anchor"></a>
<code><span>| </span></code><code><span>`A</span></code>
<code><span>| </span><span>`A</span></code>
</li>
<li id="type-polymorphic_variant.B" class="def constructor anchored">
<a href="#type-polymorphic_variant.B" class="anchor"></a>
<code><span>| </span></code>
<code><span>`B <span class="keyword">of</span> int</span></code>
<code><span>| </span>
<span>`B <span class="keyword">of</span> int</span>
</code>
</li>
<li id="type-polymorphic_variant.C" class="def constructor anchored">
<a href="#type-polymorphic_variant.C" class="anchor"></a>
<code><span>| </span></code><code><span>`C</span></code>
<code><span>| </span><span>`C</span></code>
<div class="def-doc"><span class="comment-delim">(*</span><p>foo</p>
<span class="comment-delim">*)</span>
</div>
</li>
<li id="type-polymorphic_variant.D" class="def constructor anchored">
<a href="#type-polymorphic_variant.D" class="anchor"></a>
<code><span>| </span></code><code><span>`D</span></code>
<code><span>| </span><span>`D</span></code>
<div class="def-doc"><span class="comment-delim">(*</span><p>bar</p>
<span class="comment-delim">*)</span>
</div>
Expand Down
26 changes: 13 additions & 13 deletions test/generators/html/Type.html
Original file line number Diff line number Diff line change
Expand Up @@ -387,22 +387,23 @@ <h1>Module <code><span>Type</span></code></h1>
<ol>
<li id="type-polymorphic_variant.A" class="def constructor anchored">
<a href="#type-polymorphic_variant.A" class="anchor"></a>
<code><span>| </span></code><code><span>`A</span></code>
<code><span>| </span><span>`A</span></code>
</li>
<li id="type-polymorphic_variant.B" class="def constructor anchored">
<a href="#type-polymorphic_variant.B" class="anchor"></a>
<code><span>| </span></code>
<code><span>`B <span class="keyword">of</span> int</span></code>
<code><span>| </span>
<span>`B <span class="keyword">of</span> int</span>
</code>
</li>
<li id="type-polymorphic_variant.C" class="def constructor anchored">
<a href="#type-polymorphic_variant.C" class="anchor"></a>
<code><span>| </span></code>
<code><span>`C <span class="keyword">of</span> int * unit</span>
<code><span>| </span>
<span>`C <span class="keyword">of</span> int * unit</span>
</code>
</li>
<li id="type-polymorphic_variant.D" class="def constructor anchored">
<a href="#type-polymorphic_variant.D" class="anchor"></a>
<code><span>| </span></code><code><span>`D</span></code>
<code><span>| </span><span>`D</span></code>
</li>
</ol><code><span> ]</span></code>
</div>
Expand All @@ -419,16 +420,16 @@ <h1>Module <code><span>Type</span></code></h1>
class="def type anchored">
<a href="#type-polymorphic_variant_extension.polymorphic_variant"
class="anchor">
</a><code><span>| </span></code>
<code>
</a>
<code><span>| </span>
<span><a href="#type-polymorphic_variant">polymorphic_variant</a>
</span>
</code>
</li>
<li id="type-polymorphic_variant_extension.E" class="def constructor
anchored">
<a href="#type-polymorphic_variant_extension.E" class="anchor"></a>
<code><span>| </span></code><code><span>`E</span></code>
<code><span>| </span><span>`E</span></code>
</li>
</ol><code><span> ]</span></code>
</div>
Expand All @@ -444,8 +445,7 @@ <h1>Module <code><span>Type</span></code></h1>
<li id="type-nested_polymorphic_variant.A" class="def constructor
anchored">
<a href="#type-nested_polymorphic_variant.A" class="anchor"></a>
<code><span>| </span></code>
<code>
<code><span>| </span>
<span>`A <span class="keyword">of</span>
<span>[ `B <span>| `C</span> ]</span>
</span>
Expand All @@ -465,8 +465,8 @@ <h1>Module <code><span>Type</span></code></h1>
<li id="type-private_extenion.polymorphic_variant" class="def type
anchored">
<a href="#type-private_extenion.polymorphic_variant" class="anchor">
</a><code><span>| </span></code>
<code>
</a>
<code><span>| </span>
<span><a href="#type-polymorphic_variant">polymorphic_variant</a>
</span>
</code>
Expand Down
22 changes: 11 additions & 11 deletions test/generators/latex/Ocamlary.tex
Original file line number Diff line number Diff line change
Expand Up @@ -438,8 +438,8 @@ \subsubsection{Advanced Type Stuff\label{advanced-type-stuff}}%
\begin{ocamlindent}This comment is for \ocamlinlinecode{variant}.This comment is also for \ocamlinlinecode{variant}.\end{ocamlindent}%
\medbreak
\label{module-Ocamlary-type-poly_variant}\ocamlcodefragment{\ocamltag{keyword}{type} poly\_\allowbreak{}variant = [ }\\
\begin{ocamltabular}{p{1.000\textwidth}}\ocamlinlinecode{| }\ocamlinlinecode{`TagA}\label{module-Ocamlary-type-poly_variant.TagA}\\
\ocamlinlinecode{| }\ocamlinlinecode{`ConstrB \ocamltag{keyword}{of} int}\label{module-Ocamlary-type-poly_variant.ConstrB}\\
\begin{ocamltabular}{p{1.000\textwidth}}\ocamlcodefragment{| `TagA}\label{module-Ocamlary-type-poly_variant.TagA}\\
\ocamlcodefragment{| `ConstrB \ocamltag{keyword}{of} int}\label{module-Ocamlary-type-poly_variant.ConstrB}\\
\end{ocamltabular}%
\\
\ocamlcodefragment{ ]}\begin{ocamlindent}This comment is for \ocamlinlinecode{poly\_\allowbreak{}variant}.Wow! It was a polymorphic variant!\end{ocamlindent}%
Expand Down Expand Up @@ -482,20 +482,20 @@ \subsubsection{Advanced Type Stuff\label{advanced-type-stuff}}%
\ocamlcodefragment{\}}\begin{ocamlindent}This comment is for \ocamlinlinecode{record\_\allowbreak{}alias}.\end{ocamlindent}%
\medbreak
\label{module-Ocamlary-type-poly_variant_union}\ocamlcodefragment{\ocamltag{keyword}{type} poly\_\allowbreak{}variant\_\allowbreak{}union = [ }\\
\begin{ocamltabular}{p{1.000\textwidth}}\ocamlinlinecode{| }\ocamlinlinecode{\hyperref[module-Ocamlary-type-poly_variant]{\ocamlinlinecode{poly\_\allowbreak{}variant}}}\label{module-Ocamlary-type-poly_variant_union.poly_variant}\\
\ocamlinlinecode{| }\ocamlinlinecode{`TagC}\label{module-Ocamlary-type-poly_variant_union.TagC}\\
\begin{ocamltabular}{p{1.000\textwidth}}\ocamlcodefragment{| \hyperref[module-Ocamlary-type-poly_variant]{\ocamlinlinecode{poly\_\allowbreak{}variant}}}\label{module-Ocamlary-type-poly_variant_union.poly_variant}\\
\ocamlcodefragment{| `TagC}\label{module-Ocamlary-type-poly_variant_union.TagC}\\
\end{ocamltabular}%
\\
\ocamlcodefragment{ ]}\begin{ocamlindent}This comment is for \ocamlinlinecode{poly\_\allowbreak{}variant\_\allowbreak{}union}.\end{ocamlindent}%
\medbreak
\label{module-Ocamlary-type-poly_poly_variant}\ocamlcodefragment{\ocamltag{keyword}{type} 'a poly\_\allowbreak{}poly\_\allowbreak{}variant = [ }\\
\begin{ocamltabular}{p{1.000\textwidth}}\ocamlinlinecode{| }\ocamlinlinecode{`TagA \ocamltag{keyword}{of} \ocamltag{type-var}{'a}}\label{module-Ocamlary-type-poly_poly_variant.TagA}\\
\begin{ocamltabular}{p{1.000\textwidth}}\ocamlcodefragment{| `TagA \ocamltag{keyword}{of} \ocamltag{type-var}{'a}}\label{module-Ocamlary-type-poly_poly_variant.TagA}\\
\end{ocamltabular}%
\\
\ocamlcodefragment{ ]}\\
\label{module-Ocamlary-type-bin_poly_poly_variant}\ocamlcodefragment{\ocamltag{keyword}{type} ('a,\allowbreak{} 'b) bin\_\allowbreak{}poly\_\allowbreak{}poly\_\allowbreak{}variant = [ }\\
\begin{ocamltabular}{p{1.000\textwidth}}\ocamlinlinecode{| }\ocamlinlinecode{`TagA \ocamltag{keyword}{of} \ocamltag{type-var}{'a}}\label{module-Ocamlary-type-bin_poly_poly_variant.TagA}\\
\ocamlinlinecode{| }\ocamlinlinecode{`ConstrB \ocamltag{keyword}{of} \ocamltag{type-var}{'b}}\label{module-Ocamlary-type-bin_poly_poly_variant.ConstrB}\\
\begin{ocamltabular}{p{1.000\textwidth}}\ocamlcodefragment{| `TagA \ocamltag{keyword}{of} \ocamltag{type-var}{'a}}\label{module-Ocamlary-type-bin_poly_poly_variant.TagA}\\
\ocamlcodefragment{| `ConstrB \ocamltag{keyword}{of} \ocamltag{type-var}{'b}}\label{module-Ocamlary-type-bin_poly_poly_variant.ConstrB}\\
\end{ocamltabular}%
\\
\ocamlcodefragment{ ]}\\
Expand All @@ -507,10 +507,10 @@ \subsubsection{Advanced Type Stuff\label{advanced-type-stuff}}%
\label{module-Ocamlary-type-closed_poly_variant}\ocamlcodefragment{\ocamltag{keyword}{type} 'a closed\_\allowbreak{}poly\_\allowbreak{}variant = [< `One | `Two ] \ocamltag{keyword}{as} 'a}\\
\label{module-Ocamlary-type-clopen_poly_variant}\ocamlcodefragment{\ocamltag{keyword}{type} 'a clopen\_\allowbreak{}poly\_\allowbreak{}variant = [< `One | `Two of int | `Three Two Three ] \ocamltag{keyword}{as} 'a}\\
\label{module-Ocamlary-type-nested_poly_variant}\ocamlcodefragment{\ocamltag{keyword}{type} nested\_\allowbreak{}poly\_\allowbreak{}variant = [ }\\
\begin{ocamltabular}{p{1.000\textwidth}}\ocamlinlinecode{| }\ocamlinlinecode{`A}\label{module-Ocamlary-type-nested_poly_variant.A}\\
\ocamlinlinecode{| }\ocamlinlinecode{`B \ocamltag{keyword}{of} [ `B1 | `B2 ]}\label{module-Ocamlary-type-nested_poly_variant.B}\\
\ocamlinlinecode{| }\ocamlinlinecode{`C}\label{module-Ocamlary-type-nested_poly_variant.C}\\
\ocamlinlinecode{| }\ocamlinlinecode{`D \ocamltag{keyword}{of} [ `D1 of [ `D1a ] ]}\label{module-Ocamlary-type-nested_poly_variant.D}\\
\begin{ocamltabular}{p{1.000\textwidth}}\ocamlcodefragment{| `A}\label{module-Ocamlary-type-nested_poly_variant.A}\\
\ocamlcodefragment{| `B \ocamltag{keyword}{of} [ `B1 | `B2 ]}\label{module-Ocamlary-type-nested_poly_variant.B}\\
\ocamlcodefragment{| `C}\label{module-Ocamlary-type-nested_poly_variant.C}\\
\ocamlcodefragment{| `D \ocamltag{keyword}{of} [ `D1 of [ `D1a ] ]}\label{module-Ocamlary-type-nested_poly_variant.D}\\
\end{ocamltabular}%
\\
\ocamlcodefragment{ ]}\\
Expand Down
12 changes: 6 additions & 6 deletions test/generators/latex/Recent.tex
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ \subsubsection{Signature\label{signature}}%
\begin{ocamlindent}\end{ocamlindent}%
\end{ocamlindent}%
\label{module-Recent-type-polymorphic_variant}\ocamlcodefragment{\ocamltag{keyword}{type} polymorphic\_\allowbreak{}variant = [ }\\
\begin{ocamltabular}{p{0.500\textwidth}p{0.500\textwidth}}\ocamlinlinecode{| }\ocamlinlinecode{`A}\label{module-Recent-type-polymorphic_variant.A}& \\
\ocamlinlinecode{| }\ocamlinlinecode{`B \ocamltag{keyword}{of} int}\label{module-Recent-type-polymorphic_variant.B}& \\
\ocamlinlinecode{| }\ocamlinlinecode{`C}\label{module-Recent-type-polymorphic_variant.C}& foo\\
\ocamlinlinecode{| }\ocamlinlinecode{`D}\label{module-Recent-type-polymorphic_variant.D}& bar\\
\begin{ocamltabular}{p{0.500\textwidth}p{0.500\textwidth}}\ocamlcodefragment{| `A}\label{module-Recent-type-polymorphic_variant.A}& \\
\ocamlcodefragment{| `B \ocamltag{keyword}{of} int}\label{module-Recent-type-polymorphic_variant.B}& \\
\ocamlcodefragment{| `C}\label{module-Recent-type-polymorphic_variant.C}& foo\\
\ocamlcodefragment{| `D}\label{module-Recent-type-polymorphic_variant.D}& bar\\
\end{ocamltabular}%
\\
\ocamlcodefragment{ ]}\\
Expand Down Expand Up @@ -67,8 +67,8 @@ \subsubsection{Signature\label{signature}}%
\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
\label{module-Recent-module-type-PolyS}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[module-Recent-module-type-PolyS]{\ocamlinlinecode{PolyS}}}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{module-Recent-module-type-PolyS-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = [ }\\
\begin{ocamltabular}{p{1.000\textwidth}}\ocamlinlinecode{| }\ocamlinlinecode{`A}\label{module-Recent-module-type-PolyS-type-t.A}\\
\ocamlinlinecode{| }\ocamlinlinecode{`B}\label{module-Recent-module-type-PolyS-type-t.B}\\
\begin{ocamltabular}{p{1.000\textwidth}}\ocamlcodefragment{| `A}\label{module-Recent-module-type-PolyS-type-t.A}\\
\ocamlcodefragment{| `B}\label{module-Recent-module-type-PolyS-type-t.B}\\
\end{ocamltabular}%
\\
\ocamlcodefragment{ ]}\\
Expand Down
Loading