Skip to content

Commit

Permalink
Merge pull request #1191 from Julow/man_kind_prefixing
Browse files Browse the repository at this point in the history
Consistent output file names in all backends
  • Loading branch information
Julow authored Sep 11, 2024
2 parents ef9ca48 + 40026bf commit f3b0823
Show file tree
Hide file tree
Showing 115 changed files with 1,015 additions and 1,001 deletions.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@
- Allow `][` in code blocks (@Julow, #1149)
This was interpreted as "code blocks with result", which now mandate a delimiter:
`{delim@lang[ code ]delim[ result ]}`
- Output file paths and labels in the man and latex backends changed to avoid name clashes
(@Julow, #1191)

### Fixed

Expand Down
4 changes: 4 additions & 0 deletions src/document/url.ml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ module Path = struct

let pp_kind fmt kind = Format.fprintf fmt "%s" (string_of_kind kind)

let pp_disambiguating_prefix fmt = function
| `Module | `Page | `LeafPage | `File | `SourcePage -> ()
| kind -> Format.fprintf fmt "%s-" (string_of_kind kind)

type t = { kind : kind; parent : t option; name : string }

let mk ?parent kind name = { kind; parent; name }
Expand Down
4 changes: 4 additions & 0 deletions src/document/url.mli
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ module Path : sig

val string_of_kind : kind -> string

val pp_disambiguating_prefix : Format.formatter -> kind -> unit
(** Print the ["kind-"] prefix used to disambiguate urls in "flat modes":
e.g. latex labels and output files in [--flat] HTML and man output *)

type t = { kind : kind; parent : t option; name : string }

type any_pv =
Expand Down
4 changes: 1 addition & 3 deletions src/html/link.ml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ module Path = struct
let for_printing url = List.map snd @@ Url.Path.to_list url

let segment_to_string (kind, name) =
match kind with
| `Module | `Page | `File | `SourcePage -> name
| _ -> Format.asprintf "%a-%s" Url.Path.pp_kind kind name
Format.asprintf "%a%s" Url.Path.pp_disambiguating_prefix kind name

let is_leaf_page url = url.Url.Path.kind = `LeafPage

Expand Down
12 changes: 7 additions & 5 deletions src/latex/generator.ml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
open Odoc_document.Types
open Types
module Doctree = Odoc_document.Doctree
module Url = Odoc_document.Url

module Link = struct
let rec flatten_path ppf (x : Odoc_document.Url.Path.t) =
match x.parent with
| Some p ->
Fmt.pf ppf "%a-%a-%s" flatten_path p Odoc_document.Url.Path.pp_kind
x.kind x.name
| None -> Fmt.pf ppf "%a-%s" Odoc_document.Url.Path.pp_kind x.kind x.name
let pp_parent ppf = function
| Some p -> Format.fprintf ppf "%a-" flatten_path p
| None -> ()
in
Format.fprintf ppf "%a%a%s" pp_parent x.parent
Url.Path.pp_disambiguating_prefix x.kind x.name

let page p = Format.asprintf "%a" flatten_path p

Expand Down
4 changes: 1 addition & 3 deletions src/manpage/link.ml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ open Odoc_document
let for_printing url = List.map snd @@ Url.Path.to_list url

let segment_to_string (kind, name) =
match kind with
| `Module | `Page | `LeafPage | `Class -> name
| _ -> Format.asprintf "%a-%s" Odoc_document.Url.Path.pp_kind kind name
Format.asprintf "%a%s" Url.Path.pp_disambiguating_prefix kind name

let as_filename ?(add_ext = true) (url : Url.Path.t) =
let components = Url.Path.to_list url in
Expand Down
20 changes: 10 additions & 10 deletions test/generators/latex/Alerts.tex
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
\section{Module \ocamlinlinecode{Alerts}}\label{module-Alerts}%
\label{module-Alerts-val-a}\ocamlcodefragment{\ocamltag{keyword}{val} a : int}\begin{ocamlindent}\begin{description}\kern-\topsep
\section{Module \ocamlinlinecode{Alerts}}\label{Alerts}%
\label{Alerts-val-a}\ocamlcodefragment{\ocamltag{keyword}{val} a : int}\begin{ocamlindent}\begin{description}\kern-\topsep
\makeatletter\advance\@topsepadd-\topsep\makeatother% topsep is hardcoded
\item[{deprecated}]{a}\end{description}%
\end{ocamlindent}%
\medbreak
\label{module-Alerts-val-b}\ocamlcodefragment{\ocamltag{keyword}{val} b : int}\begin{ocamlindent}\begin{description}\kern-\topsep
\label{Alerts-val-b}\ocamlcodefragment{\ocamltag{keyword}{val} b : int}\begin{ocamlindent}\begin{description}\kern-\topsep
\makeatletter\advance\@topsepadd-\topsep\makeatother% topsep is hardcoded
\item[{deprecated}]{b.}\end{description}%
\end{ocamlindent}%
\medbreak
\label{module-Alerts-val-c}\ocamlcodefragment{\ocamltag{keyword}{val} c : int}\begin{ocamlindent}\begin{description}\kern-\topsep
\label{Alerts-val-c}\ocamlcodefragment{\ocamltag{keyword}{val} c : int}\begin{ocamlindent}\begin{description}\kern-\topsep
\makeatletter\advance\@topsepadd-\topsep\makeatother% topsep is hardcoded
\item[{deprecated}]{}\end{description}%
\end{ocamlindent}%
\medbreak
\label{module-Alerts-module-Top1}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[module-Alerts-module-Top1]{\ocamlinlinecode{Top1}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\end{ocamlindent}%
\label{Alerts-module-Top1}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Alerts-Top1]{\ocamlinlinecode{Top1}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}Top-comment.\end{ocamlindent}%
\medbreak
\label{module-Alerts-module-Top2}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[module-Alerts-module-Top2]{\ocamlinlinecode{Top2}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\end{ocamlindent}%
\label{Alerts-module-Top2}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Alerts-Top2]{\ocamlinlinecode{Top2}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}Top-comment.\end{ocamlindent}%
\medbreak
\label{module-Alerts-val-d}\ocamlcodefragment{\ocamltag{keyword}{val} d : int}\begin{ocamlindent}\begin{description}\kern-\topsep
\label{Alerts-val-d}\ocamlcodefragment{\ocamltag{keyword}{val} d : int}\begin{ocamlindent}\begin{description}\kern-\topsep
\makeatletter\advance\@topsepadd-\topsep\makeatother% topsep is hardcoded
\item[{deprecated}]{A deprecated alert d}\end{description}%
\end{ocamlindent}%
\medbreak
\label{module-Alerts-val-d2}\ocamlcodefragment{\ocamltag{keyword}{val} d2 : int}\begin{ocamlindent}\begin{description}\kern-\topsep
\label{Alerts-val-d2}\ocamlcodefragment{\ocamltag{keyword}{val} d2 : int}\begin{ocamlindent}\begin{description}\kern-\topsep
\makeatletter\advance\@topsepadd-\topsep\makeatother% topsep is hardcoded
\item[{deprecated}]{}\end{description}%
\end{ocamlindent}%
\medbreak
\label{module-Alerts-val-e}\ocamlcodefragment{\ocamltag{keyword}{val} e : int}\begin{ocamlindent}\begin{description}\kern-\topsep
\label{Alerts-val-e}\ocamlcodefragment{\ocamltag{keyword}{val} e : int}\begin{ocamlindent}\begin{description}\kern-\topsep
\makeatletter\advance\@topsepadd-\topsep\makeatother% topsep is hardcoded
\item[{alert}]{e an alert}\end{description}%
\end{ocamlindent}%
\medbreak
\label{module-Alerts-val-f}\ocamlcodefragment{\ocamltag{keyword}{val} f : int}\begin{ocamlindent}\begin{description}\kern-\topsep
\label{Alerts-val-f}\ocamlcodefragment{\ocamltag{keyword}{val} f : int}\begin{ocamlindent}\begin{description}\kern-\topsep
\makeatletter\advance\@topsepadd-\topsep\makeatother% topsep is hardcoded
\item[{alert}]{f}\end{description}%
\end{ocamlindent}%
Expand Down
4 changes: 2 additions & 2 deletions test/generators/latex/Alias.X.tex
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
\section{Module \ocamlinlinecode{Alias.\allowbreak{}X}}\label{module-Alias-module-X}%
\label{module-Alias-module-X-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = int}\begin{ocamlindent}Module Foo\_\_X documentation. This should appear in the documentation for the alias to this module 'X'\end{ocamlindent}%
\section{Module \ocamlinlinecode{Alias.\allowbreak{}X}}\label{Alias-X}%
\label{Alias-X-type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = int}\begin{ocamlindent}Module Foo\_\_X documentation. This should appear in the documentation for the alias to this module 'X'\end{ocamlindent}%
\medbreak


4 changes: 2 additions & 2 deletions test/generators/latex/Alias.tex
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
\section{Module \ocamlinlinecode{Alias}}\label{module-Alias}%
\label{module-Alias-module-X}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[module-Alias-module-X]{\ocamlinlinecode{X}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\\
\section{Module \ocamlinlinecode{Alias}}\label{Alias}%
\label{Alias-module-X}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Alias-X]{\ocamlinlinecode{X}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\\

\input{Alias.X.tex}
8 changes: 4 additions & 4 deletions test/generators/latex/Bugs.tex
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
\section{Module \ocamlinlinecode{Bugs}}\label{module-Bugs}%
\label{module-Bugs-type-opt}\ocamlcodefragment{\ocamltag{keyword}{type} 'a opt = \ocamltag{type-var}{'a} option}\\
\label{module-Bugs-val-foo}\ocamlcodefragment{\ocamltag{keyword}{val} foo : \ocamltag{optlabel}{?bar}:\ocamltag{type-var}{'a} \ocamltag{arrow}{$\rightarrow$} unit \ocamltag{arrow}{$\rightarrow$} unit}\begin{ocamlindent}Triggers an assertion failure when \href{https://github.com/ocaml/odoc/issues/101}{https://github.com/ocaml/odoc/issues/101}\footnote{\url{https://github.com/ocaml/odoc/issues/101}} is not fixed.\end{ocamlindent}%
\section{Module \ocamlinlinecode{Bugs}}\label{Bugs}%
\label{Bugs-type-opt}\ocamlcodefragment{\ocamltag{keyword}{type} 'a opt = \ocamltag{type-var}{'a} option}\\
\label{Bugs-val-foo}\ocamlcodefragment{\ocamltag{keyword}{val} foo : \ocamltag{optlabel}{?bar}:\ocamltag{type-var}{'a} \ocamltag{arrow}{$\rightarrow$} unit \ocamltag{arrow}{$\rightarrow$} unit}\begin{ocamlindent}Triggers an assertion failure when \href{https://github.com/ocaml/odoc/issues/101}{https://github.com/ocaml/odoc/issues/101}\footnote{\url{https://github.com/ocaml/odoc/issues/101}} is not fixed.\end{ocamlindent}%
\medbreak
\label{module-Bugs-val-repeat}\ocamlcodefragment{\ocamltag{keyword}{val} repeat : \ocamltag{type-var}{'a} \ocamltag{arrow}{$\rightarrow$} \ocamltag{type-var}{'b} \ocamltag{arrow}{$\rightarrow$} \ocamltag{type-var}{'a} * \ocamltag{type-var}{'b} * \ocamltag{type-var}{'a} * \ocamltag{type-var}{'b}}\begin{ocamlindent}Renders as \ocamlinlinecode{val repeat : 'a -> 'b -> 'c * 'd * 'e * 'f} before https://github.com/ocaml/odoc/pull/1173\end{ocamlindent}%
\label{Bugs-val-repeat}\ocamlcodefragment{\ocamltag{keyword}{val} repeat : \ocamltag{type-var}{'a} \ocamltag{arrow}{$\rightarrow$} \ocamltag{type-var}{'b} \ocamltag{arrow}{$\rightarrow$} \ocamltag{type-var}{'a} * \ocamltag{type-var}{'b} * \ocamltag{type-var}{'a} * \ocamltag{type-var}{'b}}\begin{ocamlindent}Renders as \ocamlinlinecode{val repeat : 'a -> 'b -> 'c * 'd * 'e * 'f} before https://github.com/ocaml/odoc/pull/1173\end{ocamlindent}%
\medbreak


2 changes: 1 addition & 1 deletion test/generators/latex/Bugs_post_406.let_open'.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
\section{Class \ocamlinlinecode{Bugs\_\allowbreak{}post\_\allowbreak{}406.\allowbreak{}let\_\allowbreak{}open'}}\label{module-Bugs_post_406-class-let_open'}%
\section{Class \ocamlinlinecode{Bugs\_\allowbreak{}post\_\allowbreak{}406.\allowbreak{}let\_\allowbreak{}open'}}\label{Bugs_post_406-class-let_open'}%


6 changes: 3 additions & 3 deletions test/generators/latex/Bugs_post_406.tex
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
\section{Module \ocamlinlinecode{Bugs\_\allowbreak{}post\_\allowbreak{}406}}\label{module-Bugs_post_406}%
\section{Module \ocamlinlinecode{Bugs\_\allowbreak{}post\_\allowbreak{}406}}\label{Bugs_post_406}%
Let-open in class types, https://github.com/ocaml/odoc/issues/543 This was added to the language in 4.06

\label{module-Bugs_post_406-class-type-let_open}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{type} \hyperref[module-Bugs_post_406-class-type-let_open]{\ocamlinlinecode{let\_\allowbreak{}open}}}\ocamlcodefragment{ = \ocamltag{keyword}{object}}\begin{ocamlindent}\end{ocamlindent}%
\label{Bugs_post_406-class-type-let_open}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{type} \hyperref[Bugs_post_406-class-type-let_open]{\ocamlinlinecode{let\_\allowbreak{}open}}}\ocamlcodefragment{ = \ocamltag{keyword}{object}}\begin{ocamlindent}\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
\label{module-Bugs_post_406-class-let_open'}\ocamlcodefragment{\ocamltag{keyword}{class} \hyperref[module-Bugs_post_406-class-let_open']{\ocamlinlinecode{let\_\allowbreak{}open'}}}\ocamlcodefragment{ : \ocamltag{keyword}{object} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\\
\label{Bugs_post_406-class-let_open'}\ocamlcodefragment{\ocamltag{keyword}{class} \hyperref[Bugs_post_406-class-let_open']{\ocamlinlinecode{let\_\allowbreak{}open'}}}\ocamlcodefragment{ : \ocamltag{keyword}{object} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\\

\input{Bugs_post_406.let_open'.tex}
6 changes: 3 additions & 3 deletions test/generators/latex/Bugs_pre_410.tex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
\section{Module \ocamlinlinecode{Bugs\_\allowbreak{}pre\_\allowbreak{}410}}\label{module-Bugs_pre_410}%
\label{module-Bugs_pre_410-type-opt'}\ocamlcodefragment{\ocamltag{keyword}{type} 'a opt' = int option}\\
\label{module-Bugs_pre_410-val-foo'}\ocamlcodefragment{\ocamltag{keyword}{val} foo' : \ocamltag{optlabel}{?bar}:\ocamltag{type-var}{'a} \ocamltag{arrow}{$\rightarrow$} unit \ocamltag{arrow}{$\rightarrow$} unit}\begin{ocamlindent}Similar to \ocamlinlinecode{Bugs}, but the printed type of \ocamlinlinecode{\textasciitilde{}bar} should be \ocamlinlinecode{int}, not \ocamlinlinecode{'a}. This probably requires fixing in the compiler. See \href{https://github.com/ocaml/odoc/pull/230\#issuecomment-433226807}{https://github.com/ocaml/odoc/pull/230\#issuecomment-433226807}\footnote{\url{https://github.com/ocaml/odoc/pull/230\#issuecomment-433226807}}.\end{ocamlindent}%
\section{Module \ocamlinlinecode{Bugs\_\allowbreak{}pre\_\allowbreak{}410}}\label{Bugs_pre_410}%
\label{Bugs_pre_410-type-opt'}\ocamlcodefragment{\ocamltag{keyword}{type} 'a opt' = int option}\\
\label{Bugs_pre_410-val-foo'}\ocamlcodefragment{\ocamltag{keyword}{val} foo' : \ocamltag{optlabel}{?bar}:\ocamltag{type-var}{'a} \ocamltag{arrow}{$\rightarrow$} unit \ocamltag{arrow}{$\rightarrow$} unit}\begin{ocamlindent}Similar to \ocamlinlinecode{Bugs}, but the printed type of \ocamlinlinecode{\textasciitilde{}bar} should be \ocamlinlinecode{int}, not \ocamlinlinecode{'a}. This probably requires fixing in the compiler. See \href{https://github.com/ocaml/odoc/pull/230\#issuecomment-433226807}{https://github.com/ocaml/odoc/pull/230\#issuecomment-433226807}\footnote{\url{https://github.com/ocaml/odoc/pull/230\#issuecomment-433226807}}.\end{ocamlindent}%
\medbreak


2 changes: 1 addition & 1 deletion test/generators/latex/Class.empty_virtual'.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
\section{Class \ocamlinlinecode{Class.\allowbreak{}empty\_\allowbreak{}virtual'}}\label{module-Class-class-empty_virtual'}%
\section{Class \ocamlinlinecode{Class.\allowbreak{}empty\_\allowbreak{}virtual'}}\label{Class-class-empty_virtual'}%


2 changes: 1 addition & 1 deletion test/generators/latex/Class.mutually'.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
\section{Class \ocamlinlinecode{Class.\allowbreak{}mutually'}}\label{module-Class-class-mutually'}%
\section{Class \ocamlinlinecode{Class.\allowbreak{}mutually'}}\label{Class-class-mutually'}%


2 changes: 1 addition & 1 deletion test/generators/latex/Class.polymorphic'.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
\section{Class \ocamlinlinecode{Class.\allowbreak{}polymorphic'}}\label{module-Class-class-polymorphic'}%
\section{Class \ocamlinlinecode{Class.\allowbreak{}polymorphic'}}\label{Class-class-polymorphic'}%


2 changes: 1 addition & 1 deletion test/generators/latex/Class.recursive'.tex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
\section{Class \ocamlinlinecode{Class.\allowbreak{}recursive'}}\label{module-Class-class-recursive'}%
\section{Class \ocamlinlinecode{Class.\allowbreak{}recursive'}}\label{Class-class-recursive'}%


20 changes: 10 additions & 10 deletions test/generators/latex/Class.tex
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
\section{Module \ocamlinlinecode{Class}}\label{module-Class}%
\label{module-Class-class-type-empty}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{type} \hyperref[module-Class-class-type-empty]{\ocamlinlinecode{empty}}}\ocamlcodefragment{ = \ocamltag{keyword}{object}}\begin{ocamlindent}\end{ocamlindent}%
\section{Module \ocamlinlinecode{Class}}\label{Class}%
\label{Class-class-type-empty}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{type} \hyperref[Class-class-type-empty]{\ocamlinlinecode{empty}}}\ocamlcodefragment{ = \ocamltag{keyword}{object}}\begin{ocamlindent}\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
\label{module-Class-class-type-mutually}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{type} \hyperref[module-Class-class-type-mutually]{\ocamlinlinecode{mutually}}}\ocamlcodefragment{ = \ocamltag{keyword}{object}}\begin{ocamlindent}\end{ocamlindent}%
\label{Class-class-type-mutually}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{type} \hyperref[Class-class-type-mutually]{\ocamlinlinecode{mutually}}}\ocamlcodefragment{ = \ocamltag{keyword}{object}}\begin{ocamlindent}\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
\label{module-Class-class-type-recursive}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{type} \hyperref[module-Class-class-type-recursive]{\ocamlinlinecode{recursive}}}\ocamlcodefragment{ = \ocamltag{keyword}{object}}\begin{ocamlindent}\end{ocamlindent}%
\label{Class-class-type-recursive}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{type} \hyperref[Class-class-type-recursive]{\ocamlinlinecode{recursive}}}\ocamlcodefragment{ = \ocamltag{keyword}{object}}\begin{ocamlindent}\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
\label{module-Class-class-mutually'}\ocamlcodefragment{\ocamltag{keyword}{class} \hyperref[module-Class-class-mutually']{\ocamlinlinecode{mutually'}}}\ocamlcodefragment{ : \hyperref[module-Class-class-type-mutually]{\ocamlinlinecode{mutually}}}\\
\label{module-Class-class-recursive'}\ocamlcodefragment{\ocamltag{keyword}{class} \hyperref[module-Class-class-recursive']{\ocamlinlinecode{recursive'}}}\ocamlcodefragment{ : \hyperref[module-Class-class-type-recursive]{\ocamlinlinecode{recursive}}}\\
\label{module-Class-class-type-empty_virtual}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{type} \ocamltag{keyword}{virtual} \hyperref[module-Class-class-type-empty_virtual]{\ocamlinlinecode{empty\_\allowbreak{}virtual}}}\ocamlcodefragment{ = \ocamltag{keyword}{object}}\begin{ocamlindent}\end{ocamlindent}%
\label{Class-class-mutually'}\ocamlcodefragment{\ocamltag{keyword}{class} \hyperref[Class-class-mutually']{\ocamlinlinecode{mutually'}}}\ocamlcodefragment{ : \hyperref[Class-class-type-mutually]{\ocamlinlinecode{mutually}}}\\
\label{Class-class-recursive'}\ocamlcodefragment{\ocamltag{keyword}{class} \hyperref[Class-class-recursive']{\ocamlinlinecode{recursive'}}}\ocamlcodefragment{ : \hyperref[Class-class-type-recursive]{\ocamlinlinecode{recursive}}}\\
\label{Class-class-type-empty_virtual}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{type} \ocamltag{keyword}{virtual} \hyperref[Class-class-type-empty_virtual]{\ocamlinlinecode{empty\_\allowbreak{}virtual}}}\ocamlcodefragment{ = \ocamltag{keyword}{object}}\begin{ocamlindent}\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
\label{module-Class-class-empty_virtual'}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{virtual} \hyperref[module-Class-class-empty_virtual']{\ocamlinlinecode{empty\_\allowbreak{}virtual'}}}\ocamlcodefragment{ : \hyperref[module-Class-class-type-empty]{\ocamlinlinecode{empty}}}\\
\label{module-Class-class-type-polymorphic}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{type} 'a \hyperref[module-Class-class-type-polymorphic]{\ocamlinlinecode{polymorphic}}}\ocamlcodefragment{ = \ocamltag{keyword}{object}}\begin{ocamlindent}\end{ocamlindent}%
\label{Class-class-empty_virtual'}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{virtual} \hyperref[Class-class-empty_virtual']{\ocamlinlinecode{empty\_\allowbreak{}virtual'}}}\ocamlcodefragment{ : \hyperref[Class-class-type-empty]{\ocamlinlinecode{empty}}}\\
\label{Class-class-type-polymorphic}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{type} 'a \hyperref[Class-class-type-polymorphic]{\ocamlinlinecode{polymorphic}}}\ocamlcodefragment{ = \ocamltag{keyword}{object}}\begin{ocamlindent}\end{ocamlindent}%
\ocamlcodefragment{\ocamltag{keyword}{end}}\\
\label{module-Class-class-polymorphic'}\ocamlcodefragment{\ocamltag{keyword}{class} 'a \hyperref[module-Class-class-polymorphic']{\ocamlinlinecode{polymorphic'}}}\ocamlcodefragment{ : \ocamltag{type-var}{'a} \hyperref[module-Class-class-type-polymorphic]{\ocamlinlinecode{polymorphic}}}\\
\label{Class-class-polymorphic'}\ocamlcodefragment{\ocamltag{keyword}{class} 'a \hyperref[Class-class-polymorphic']{\ocamlinlinecode{polymorphic'}}}\ocamlcodefragment{ : \ocamltag{type-var}{'a} \hyperref[Class-class-type-polymorphic]{\ocamlinlinecode{polymorphic}}}\\

\input{Class.mutually'.tex}
\input{Class.recursive'.tex}
Expand Down
Loading

0 comments on commit f3b0823

Please sign in to comment.