···85 end
8687(** Extract universe hash from html_path.
88- Path format: .../prep/universes/{universe}/{pkg}/{version}/html *)
89let extract_universe html_path =
90 let parts = String.split_on_char '/' html_path in
91 let rec find_after_universes = function
···120 None
121 with _ -> None
122123-(** Check if a directory name is a doc layer (doc-{hash}, but not doc-driver- or doc-odoc-) *)
124let is_doc_layer_dir name =
125 let len = String.length name in
126 len > 4 && String.sub name 0 4 = "doc-"
···85 end
8687(** Extract universe hash from html_path.
88+ Path format: [.../prep/universes/<universe>/<pkg>/<version>/html] *)
89let extract_universe html_path =
90 let parts = String.split_on_char '/' html_path in
91 let rec find_after_universes = function
···120 None
121 with _ -> None
122123+(** Check if a directory name is a doc layer ([doc-<hash>], but not [doc-driver-] or [doc-odoc-]) *)
124let is_doc_layer_dir name =
125 let len = String.length name in
126 len > 4 && String.sub name 0 4 = "doc-"
+1-1
day10/bin/jtw_tools.ml
···3 Per OCaml version: installs js_of_ocaml and js_top_worker (pinned from
4 a git repo), builds worker.js, and extracts stdlib cmis + dynamic_cmis.json.
56- Cached as jtw-tools-{hash}/ per OCaml version + repo + branch. *)
78(** Compute hash for the jtw-tools layer.
9 Depends on OCaml version, repo, and branch. *)
···3 Per OCaml version: installs js_of_ocaml and js_top_worker (pinned from
4 a git repo), builds worker.js, and extracts stdlib cmis + dynamic_cmis.json.
56+ Cached as [jtw-tools-<hash>/] per OCaml version + repo + branch. *)
78(** Compute hash for the jtw-tools layer.
9 Depends on OCaml version, repo, and branch. *)
+1-1
day10/bin/linux.ml
···396(** Run odoc_driver_voodoo in a container.
397398 This runs odoc_driver_voodoo which:
399- - Finds packages in prep/universes/{u}/{pkg}/{v}/
400 - Compiles .cmti/.cmt to .odoc with marker files
401 - Links and generates HTML
402 - Uses marker files to find dependencies
···396(** Run odoc_driver_voodoo in a container.
397398 This runs odoc_driver_voodoo which:
399+ - Finds packages in [prep/universes/<u>/<pkg>/<v>/]
400 - Compiles .cmti/.cmt to .odoc with marker files
401 - Links and generates HTML
402 - Uses marker files to find dependencies
···529530 This module provides atomic swap operations for documentation directories,
531 implementing the "fresh docs with graceful degradation" pattern:
532- - Write new docs to a staging directory ({dir}.new)
533- - On success, atomically swap: old -> .old, new -> current, remove .old
534 - On failure, leave original docs untouched
535536 Recovery: On startup, clean up any stale .new or .old directories left
···529530 This module provides atomic swap operations for documentation directories,
531 implementing the "fresh docs with graceful degradation" pattern:
532+ - Write new docs to a staging directory ([dir.new])
533+ - On success, atomically swap: old -> [.old], new -> current, remove [.old]
534 - On failure, leave original docs untouched
535536 Recovery: On startup, clean up any stale .new or .old directories left
+2-2
day10/bin/sync_docs.ml
···11}
1213(** Extract universe hash from html_path.
14- Path format: .../prep/universes/{universe}/{pkg}/{version}/html *)
15let extract_universe html_path =
16 let parts = String.split_on_char '/' html_path in
17 let rec find_after_universes = function
···42 with
43 | _ -> None
4445-(** Check if a directory name is a doc layer (doc-{hash}, but not doc-driver- or doc-odoc-) *)
46let is_doc_layer_dir name =
47 let len = String.length name in
48 len > 4 && String.sub name 0 4 = "doc-"
···11}
1213(** Extract universe hash from html_path.
14+ Path format: [.../prep/universes/<universe>/<pkg>/<version>/html] *)
15let extract_universe html_path =
16 let parts = String.split_on_char '/' html_path in
17 let rec find_after_universes = function
···42 with
43 | _ -> None
4445+(** Check if a directory name is a doc layer ([doc-<hash>], but not [doc-driver-] or [doc-odoc-]) *)
46let is_doc_layer_dir name =
47 let len = String.length name in
48 len > 4 && String.sub name 0 4 = "doc-"
+1-1
day10/bin/util.ml
···41 in
42 Yojson.Safe.to_file name (`Assoc fields)
4344-(** Ensure a symlink exists from packages/{pkg_str}/{layer_name} -> ../../{layer_name}
45 This enables tracking all builds/docs for a package.version. *)
46let ensure_package_layer_symlink ~cache_dir ~os_key ~pkg_str ~layer_name =
47 let pkg_dir = Path.(cache_dir / os_key / "packages" / pkg_str) in
···41 in
42 Yojson.Safe.to_file name (`Assoc fields)
4344+(** Ensure a symlink exists from [packages/<pkg_str>/<layer_name>] to [../../<layer_name>].
45 This enables tracking all builds/docs for a package.version. *)
46let ensure_package_layer_symlink ~cache_dir ~os_key ~pkg_str ~layer_name =
47 let pkg_dir = Path.(cache_dir / os_key / "packages" / pkg_str) in
+5-5
day10/lib/atomic_swap.ml
···23 This module provides atomic swap operations for documentation directories,
4 implementing the "fresh docs with graceful degradation" pattern:
5- - Write new docs to a staging directory ({dir}.new)
6- - On success, atomically swap: old -> .old, new -> current, remove .old
7 - On failure, leave original docs intact
89 This is a standalone module that can be used for testing without
···8990(** Get paths for atomic swap operations.
91 Returns (staging_dir, final_dir, old_dir) where:
92- - staging_dir: {version}.new - where new docs are written
93- - final_dir: {version} - the live docs location
94- - old_dir: {version}.old - backup during swap *)
95let get_swap_paths ~html_dir ~pkg ~version ~blessed ~universe =
96 let base_dir =
97 if blessed then
···23 This module provides atomic swap operations for documentation directories,
4 implementing the "fresh docs with graceful degradation" pattern:
5+ - Write new docs to a staging directory ([dir.new])
6+ - On success, atomically swap: old -> [.old], new -> current, remove [.old]
7 - On failure, leave original docs intact
89 This is a standalone module that can be used for testing without
···8990(** Get paths for atomic swap operations.
91 Returns (staging_dir, final_dir, old_dir) where:
92+ - staging_dir: [<version>.new] - where new docs are written
93+ - final_dir: [<version>] - the live docs location
94+ - old_dir: [<version>.old] - backup during swap *)
95let get_swap_paths ~html_dir ~pkg ~version ~blessed ~universe =
96 let base_dir =
97 if blessed then
+5-3
day10/lib/build_lock.ml
···4 providing reliable "in progress" detection without stale state.
56 Lock file naming:
7- locks/build-{package}.{version}-{universe}.lock
8- locks/doc-{package}.{version}-{universe}.lock
9- locks/tool-{name}.lock or locks/tool-{name}-{ocaml_version}.lock
001011 This module provides query functions for the web UI. The actual lock
12 acquisition is done by Os.create_directory_exclusively in bin/os.ml. *)
···4 providing reliable "in progress" detection without stale state.
56 Lock file naming:
7+ {[
8+ locks/build-<package>.<version>-<universe>.lock
9+ locks/doc-<package>.<version>-<universe>.lock
10+ locks/tool-<name>.lock or locks/tool-<name>-<ocaml_version>.lock
11+ ]}
1213 This module provides query functions for the web UI. The actual lock
14 acquisition is done by Os.create_directory_exclusively in bin/os.ml. *)
+6-4
day10/lib/run_log.ml
···1(** Run logging for batch processing.
23 Manages timestamp-based run directories with structured logs:
4- - runs/{id}/summary.json
5- - runs/{id}/build/{package}.log
6- - runs/{id}/docs/{package}.log
7- - latest -> runs/{id} (symlink)
008*)
910(** Run metadata *)
···1(** Run logging for batch processing.
23 Manages timestamp-based run directories with structured logs:
4+ {[
5+ runs/<id>/summary.json
6+ runs/<id>/build/<package>.log
7+ runs/<id>/docs/<package>.log
8+ latest -> runs/<id> (symlink)
9+ ]}
10*)
1112(** Run metadata *)
+8-6
day10/web/data/layer_data.ml
···1(** Read layer info for packages from day10's cache directory.
2- Uses the packages/{pkg}/ directory structure with symlinks:
3- - build-{hash} -> ../../build-{hash} (all builds)
4- - doc-{hash} -> ../../doc-{hash} (all docs)
5- - blessed-build -> ../../build-{hash} (canonical build if blessed)
6- - blessed-docs -> ../../doc-{hash} (canonical docs if blessed)
7- Falls back to scanning build-* directories if no symlinks exist. *)
0089type layer_info = {
10 package: string;
···1(** Read layer info for packages from day10's cache directory.
2+ Uses the [packages/<pkg>/] directory structure with symlinks:
3+ {[
4+ build-<hash> -> ../../build-<hash> (all builds)
5+ doc-<hash> -> ../../doc-<hash> (all docs)
6+ blessed-build -> ../../build-<hash> (canonical build if blessed)
7+ blessed-docs -> ../../doc-<hash> (canonical docs if blessed)
8+ ]}
9+ Falls back to scanning [build-*] directories if no symlinks exist. *)
1011type layer_info = {
12 package: string;
+1-1
day10/web/views/live_log.ml
···23 else
24 None
2526-(** Try to find a completed layer log by looking in packages/{pkg_str}/ for layer symlinks *)
27let find_completed_layer_log ~cache_dir ~platform ~stage ~pkg_str =
28 let pkg_dir = Filename.concat (Filename.concat (Filename.concat cache_dir platform) "packages") pkg_str in
29 if not (Sys.file_exists pkg_dir) then None
···23 else
24 None
2526+(** Try to find a completed layer log by looking in [packages/<pkg_str>/] for layer symlinks *)
27let find_completed_layer_log ~cache_dir ~platform ~stage ~pkg_str =
28 let pkg_dir = Filename.concat (Filename.concat (Filename.concat cache_dir platform) "packages") pkg_str in
29 if not (Sys.file_exists pkg_dir) then None
···1+# Sherlodoc Markdown Storage
2+3+## Problem
4+5+Sherlodoc stores documentation as pre-rendered HTML (`doc_html` field in `Entry.t`).
6+This is unsuitable for LLM/AI consumption and terminal CLI display, where markdown
7+is the natural format.
8+9+## Solution
10+11+Add a `doc_markdown : string` field to `Entry.t`, populated at index time using
12+odoc's markdown2 renderer (with LLM-specific improvements: fully qualified paths
13+and unified code blocks for type definitions).
14+15+## Approach: Dual storage (Approach 1)
16+17+Store both `doc_html` and `doc_markdown` in each entry. Compute both at index time.
18+No runtime conversion needed. Database size increase is modest since doc comments
19+are typically small.
20+21+## Changes
22+23+### 1. `db/entry.ml` — Add `doc_markdown` field
24+25+```ocaml
26+type t =
27+ { name : string
28+ ; rhs : string option
29+ ; url : string
30+ ; kind : Kind.t
31+ ; cost : int
32+ ; doc_html : string
33+ ; doc_markdown : string (* NEW *)
34+ ; pkg : Package.t
35+ }
36+```
37+38+Update `v`, `pp`, `structural_compare` accordingly.
39+40+### 2. `odoc/src/search/` — Add markdown rendering for doc comments
41+42+Add a `markdown_string_of_doc` function that mirrors `html_string_of_doc`:
43+44+```
45+Comment.elements
46+ -> Odoc_document.Comment.to_ir
47+ -> Odoc_markdown.Generator.block
48+ -> Renderer.to_string (Renderer.Block.Blocks blocks)
49+ -> string
50+```
51+52+The search module's dune gains a dependency on `odoc_markdown`.
53+54+### 3. `index/load_doc.ml` — Populate `doc_markdown` at index time
55+56+In `register_entry`, compute `doc_markdown` alongside `doc_html`:
57+58+```ocaml
59+let doc_markdown =
60+ match doc_txt with
61+ | "" -> ""
62+ | _ -> markdown_string_of_doc doc
63+in
64+```
65+66+The index dune gains a dependency on `odoc_markdown` (via the search module).
67+68+### 4. `cli/search.ml` — Default to markdown in CLI output
69+70+- Change `--print-docstring-html` to print `elt.doc_markdown` and rename to
71+ `--print-docstring` (keeping `--print-docstring-html` for HTML output)
72+- When `--print-docstring` is set, print `elt.doc_markdown`
73+74+### 5. Storage scope
75+76+Marshal format only for now — it serializes `Entry.t` directly so adding a field
77+Just Works. JS and ancient formats can be extended later.
78+79+## What stays the same
80+81+- Suffix tree / type polarity indices — unchanged
82+- Search algorithm — unchanged
83+- `doc_html` field — kept for browser/HTML consumers
84+- Text tokenization for search indexing — still uses `Text.of_doc`
85+86+## LLM markdown improvements (cherry-picked from jonludlam/odoc)
87+88+These commits improve markdown quality for LLM consumption:
89+90+1. **Fully qualified paths** — `Foo.Bar.t` instead of just `t`
91+2. **Unified code blocks** — Type definitions rendered as single code blocks
92+ with inline doc comments instead of fragmented separate blocks
93+3. **Record field types** — Proper extraction of all inline elements
94+95+## Dependencies
96+97+The `index` library needs `odoc_markdown` added to its dune dependencies.
98+The `db` library has no new dependencies.
···128(** Parse a findlib_index file (JSON or legacy text format) and return
129 the list of META file paths and universe paths.
130131- JSON format: {"meta_files": ["path/to/META", ...], "universes": ["universe1", ...]}
132133 meta_files: direct paths to META files
134 universes: paths to other universes (directories containing findlib_index) *)
···128(** Parse a findlib_index file (JSON or legacy text format) and return
129 the list of META file paths and universe paths.
130131+ JSON format: [{"meta_files": [...], "universes": [...]}]
132133 meta_files: direct paths to META files
134 universes: paths to other universes (directories containing findlib_index) *)
···4 externally via CSS custom properties defined in {!Scrollycode_css}
5 and set by theme files in {!Scrollycode_themes}.
67- Authoring format uses @scrolly custom tags with an ordered
8 list inside, where each list item is a tutorial step containing
9 a bold title, prose paragraphs, and a code block.
10
···4 externally via CSS custom properties defined in {!Scrollycode_css}
5 and set by theme files in {!Scrollycode_themes}.
67+ Authoring format uses [@scrolly] custom tags with an ordered
8 list inside, where each list item is a tutorial step containing
9 a bold title, prose paragraphs, and a code block.
10
+29-11
odoc/sherlodoc/cli/search.ml
···20 | Page -> "page"
21 | Impl -> "source"
2223-let print_result ~print_cost ~print_docstring ~no_rhs (elt : Db.Entry.t) =
0024 let cost = if print_cost then string_of_int elt.cost ^ " " else "" in
25 let typedecl_params =
26 (match elt.kind with
···36 | Some _ when no_rhs -> ()
37 | Some rhs -> Format.fprintf h "%s" (Unescape.string rhs)
38 in
39- let docstring = if print_docstring then "\n" ^ elt.doc_html else "" in
0000040 Format.printf "%s%s %s%s%a%s@." cost kind typedecl_params name pp_rhs elt.rhs docstring
4142let search
···47 ~no_rhs
48 ~pretty_query
49 ~time
50- ~print_docstring
51 query
52 =
53 let query = Query.{ query; packages = []; limit } in
···58 match r with
59 | [] -> print_endline "[No results]"
60 | _ :: _ as results ->
61- List.iter (print_result ~print_cost ~print_docstring ~no_rhs) results ;
62 flush stdout ;
63 if time then Format.printf "Search in %f@." (t1 -. t0)
64···69 ~static_sort
70 ~limit
71 ~time
72- ~print_docstring
73 ~db
74 =
75 Printf.printf "%ssearch>%s %!" "\027[0;36m" "\027[0;0m" ;
···83 ~no_rhs
84 ~pretty_query
85 ~time
86- ~print_docstring
87 query ;
88 search_loop
89 ~print_cost
···92 ~static_sort
93 ~limit
94 ~time
95- ~print_docstring
96 ~db
97 | exception End_of_file -> Printf.printf "\n%!"
98···105 pretty_query
106 time
107 print_docstring
0108 db_format
109 db_filename
110 =
00000111 let module Storage = (val Db_store.storage_module db_format) in
112 let db = Storage.load db_filename in
113 match query with
···120 ~static_sort
121 ~limit
122 ~time
123- ~print_docstring
124 ~db
125 | Some query ->
126 search
···130 ~static_sort
131 ~limit
132 ~time
133- ~print_docstring
134 ~db
135 query
136···169 Arg.(value & flag & info [ "pretty-query" ] ~doc)
170171let print_docstring =
172- let doc = "Print the HTML of the docstring of the results" in
0000173 Arg.(value & flag & info [ "print-docstring-html" ] ~doc)
174175let term =
···182 $ limit
183 $ pretty_query
184 $ print_time
185- $ print_docstring)
0
···20 | Page -> "page"
21 | Impl -> "source"
2223+type docstring_format = No_docstring | Markdown | Html
24+25+let print_result ~print_cost ~docstring_format ~no_rhs (elt : Db.Entry.t) =
26 let cost = if print_cost then string_of_int elt.cost ^ " " else "" in
27 let typedecl_params =
28 (match elt.kind with
···38 | Some _ when no_rhs -> ()
39 | Some rhs -> Format.fprintf h "%s" (Unescape.string rhs)
40 in
41+ let docstring =
42+ match docstring_format with
43+ | No_docstring -> ""
44+ | Markdown -> "\n" ^ elt.doc_markdown
45+ | Html -> "\n" ^ elt.doc_html
46+ in
47 Format.printf "%s%s %s%s%a%s@." cost kind typedecl_params name pp_rhs elt.rhs docstring
4849let search
···54 ~no_rhs
55 ~pretty_query
56 ~time
57+ ~docstring_format
58 query
59 =
60 let query = Query.{ query; packages = []; limit } in
···65 match r with
66 | [] -> print_endline "[No results]"
67 | _ :: _ as results ->
68+ List.iter (print_result ~print_cost ~docstring_format ~no_rhs) results ;
69 flush stdout ;
70 if time then Format.printf "Search in %f@." (t1 -. t0)
71···76 ~static_sort
77 ~limit
78 ~time
79+ ~docstring_format
80 ~db
81 =
82 Printf.printf "%ssearch>%s %!" "\027[0;36m" "\027[0;0m" ;
···90 ~no_rhs
91 ~pretty_query
92 ~time
93+ ~docstring_format
94 query ;
95 search_loop
96 ~print_cost
···99 ~static_sort
100 ~limit
101 ~time
102+ ~docstring_format
103 ~db
104 | exception End_of_file -> Printf.printf "\n%!"
105···112 pretty_query
113 time
114 print_docstring
115+ print_docstring_html
116 db_format
117 db_filename
118 =
119+ let docstring_format =
120+ if print_docstring then Markdown
121+ else if print_docstring_html then Html
122+ else No_docstring
123+ in
124 let module Storage = (val Db_store.storage_module db_format) in
125 let db = Storage.load db_filename in
126 match query with
···133 ~static_sort
134 ~limit
135 ~time
136+ ~docstring_format
137 ~db
138 | Some query ->
139 search
···143 ~static_sort
144 ~limit
145 ~time
146+ ~docstring_format
147 ~db
148 query
149···182 Arg.(value & flag & info [ "pretty-query" ] ~doc)
183184let print_docstring =
185+ let doc = "Print the markdown docstring of the results" in
186+ Arg.(value & flag & info [ "print-docstring" ] ~doc)
187+188+let print_docstring_html =
189+ let doc = "Print the HTML docstring of the results" in
190 Arg.(value & flag & info [ "print-docstring-html" ] ~doc)
191192let term =
···199 $ limit
200 $ pretty_query
201 $ print_time
202+ $ print_docstring
203+ $ print_docstring_html)
···2324 How is polarity computed exactly ? When you have [t -> u], the polarity of [t]
25 is inversed, and the polarity of [u] stays the same. A good example of this is
26- the type of {!Stdlib.Out_channel.with_open_gen} :
2728 {[
29 val with_open_gen : open_flag list -> int -> string -> (t -> 'a) -> 'a
···32 Here the polarities are [-open_flag list], [-int], [-string], [+Out_channel.t],
33 [-'a] and [+'a]. The fact that we have [+Out_channel.t] might be puzzling at
34 first, because an [Out_channel.t] is not returned by the function, but
35- {!Stdlib.Out_channel.with_open_gen} is indeed one of the possible ways to create
36 an [Out_channel.t].
3738 There is however a complication. If the user queries for [int -> int -> string],
···2324 How is polarity computed exactly ? When you have [t -> u], the polarity of [t]
25 is inversed, and the polarity of [u] stays the same. A good example of this is
26+ the type of [Out_channel.with_open_gen] :
2728 {[
29 val with_open_gen : open_flag list -> int -> string -> (t -> 'a) -> 'a
···32 Here the polarities are [-open_flag list], [-int], [-string], [+Out_channel.t],
33 [-'a] and [+'a]. The fact that we have [+Out_channel.t] might be puzzling at
34 first, because an [Out_channel.t] is not returned by the function, but
35+ [Out_channel.with_open_gen] is indeed one of the possible ways to create
36 an [Out_channel.t].
3738 There is however a complication. If the user queries for [int -> int -> string],
···185 | "" -> ""
186 | _ -> string_of_html (Html.of_doc doc)
187 in
000000000000188 let rhs = Html.rhs_of_kind kind in
189 let kind = convert_kind ~db entry in
190 let cost = cost ~name ~kind ~doc_html ~rhs ~cat ~favourite ~favoured_prefixes in
191 let url = Html.url entry in
192- let elt = Sherlodoc_entry.v ~name ~kind ~rhs ~doc_html ~cost ~url ~pkg () in
193 if index_docstring then register_doc ~db elt doc_txt ;
194 if index_name && kind <> Doc then register_full_name ~db elt ;
195 if type_search then register_kind ~db elt
···185 | "" -> ""
186 | _ -> string_of_html (Html.of_doc doc)
187 in
188+ let doc_markdown =
189+ match doc_txt with
190+ | "" -> ""
191+ | _ ->
192+ let config =
193+ Odoc_markdown.Config.make ~root_url:None ~allow_html:false ()
194+ in
195+ let ir = Odoc_document.Comment.to_ir doc in
196+ let blocks = Odoc_markdown.Generator.block ~config ~xref_base_uri:"" ir in
197+ Odoc_markdown.Renderer.to_string
198+ (Odoc_markdown.Renderer.Block.Blocks blocks)
199+ in
200 let rhs = Html.rhs_of_kind kind in
201 let kind = convert_kind ~db entry in
202 let cost = cost ~name ~kind ~doc_html ~rhs ~cat ~favourite ~favoured_prefixes in
203 let url = Html.url entry in
204+ let elt = Sherlodoc_entry.v ~name ~kind ~rhs ~doc_html ~doc_markdown ~cost ~url ~pkg () in
205 if index_docstring then register_doc ~db elt doc_txt ;
206 if index_name && kind <> Doc then register_full_name ~db elt ;
207 if type_search then register_kind ~db elt
+1-1
odoc/sherlodoc/query/test/test_succ.ml
···3let pkg = Db.Entry.Package.v ~name:"" ~version:""
45let elt cost =
6- Db.Entry.v ~cost ~name:"" ~kind:Db.Entry.Kind.Doc ~rhs:None ~doc_html:"" ~url:"" ~pkg ()
78(** This module does the same thing as Succ, but its correctness is obvious
9 and its performance terrible. *)
···3let pkg = Db.Entry.Package.v ~name:"" ~version:""
45let elt cost =
6+ Db.Entry.v ~cost ~name:"" ~kind:Db.Entry.Kind.Doc ~rhs:None ~doc_html:"" ~doc_markdown:"" ~url:"" ~pkg ()
78(** This module does the same thing as Succ, but its correctness is obvious
9 and its performance terrible. *)
···4 $ export SHERLODOC_DB=db.bin
5 $ export SHERLODOC_FORMAT=marshal
6 $ sherlodoc index $(find . -name '*.odocl')
7- $ sherlodoc search --print-docstring "foo"
8 val A.foo : int
9 <div><p>This is a docstring with a <span>link</span></p></div>
10- $ sherlodoc search --print-docstring "bar"
11 val A.bar : int
12 <div><p>This is a docstring with a ref to <span><code>foo</code></span></p></div>
···4 $ export SHERLODOC_DB=db.bin
5 $ export SHERLODOC_FORMAT=marshal
6 $ sherlodoc index $(find . -name '*.odocl')
7+ $ sherlodoc search --print-docstring-html "foo"
8 val A.foo : int
9 <div><p>This is a docstring with a <span>link</span></p></div>
10+ $ sherlodoc search --print-docstring-html "bar"
11 val A.bar : int
12 <div><p>This is a docstring with a ref to <span><code>foo</code></span></p></div>
···1+2+(** This is a docstring with a {{:https://sherlocode.com}link} *)
3+val foo : int
4+5+(** This is a docstring with a ref to {!foo} *)
6+val bar : int
7+8+(** [hello name] returns a greeting for [name].
9+10+ For example:
11+ {[
12+ hello "world" = "Hello, world!"
13+ ]}
14+*)
15+val hello : string -> string
···1+ $ ocamlc -c a.mli -bin-annot -I .
2+ $ odoc compile -I . a.cmti
3+ $ odoc link -I . a.odoc
4+ $ export SHERLODOC_DB=db.bin
5+ $ export SHERLODOC_FORMAT=marshal
6+ $ sherlodoc index $(find . -name '*.odocl')
7+8+Search without docstrings:
9+10+ $ sherlodoc search "foo" 2>&1
11+ val A.foo : int
12+13+Search with markdown docstrings:
14+15+ $ sherlodoc search --print-docstring "foo" 2>&1
16+ val A.foo : int
17+ This is a docstring with a [link](https://sherlocode.com)
18+19+20+ $ sherlodoc search --print-docstring "bar" 2>&1
21+ val A.bar : int
22+ This is a docstring with a ref to [`foo`](A.md#val-foo)
23+24+25+ $ sherlodoc search --print-docstring "hello" 2>&1
26+ val A.hello : string -> string
27+ `hello name` returns a greeting for `name`.
28+29+ For example:
30+31+ ```ocaml
32+ hello "world" = "Hello, world!"
33+ ```
34+35+36+Search with HTML docstrings:
37+38+ $ sherlodoc search --print-docstring-html "foo" 2>&1
39+ val A.foo : int
40+ <div><p>This is a docstring with a <span>link</span></p></div>
+48-1
odoc/src/document/url.ml
···2open Odoc_model.Names
3module Root = Odoc_model.Root
4000000000000000000000000000000000000000000000005let render_path : Path.t -> string =
6 let rec render_resolved : Path.Resolved.t -> string =
7 let open Path.Resolved in
8 function
9- | `Identifier id -> Identifier.name id
10 | `CoreType n -> TypeName.to_string n
11 | `OpaqueModule p -> render_resolved (p :> t)
12 | `OpaqueModuleType p -> render_resolved (p :> t)
···305 match header with Some header -> Some header | None -> None
306 in
307 let inline_source = source inline_text_only code in
308- let code = [ String.concat ~sep:"" inline_source ] in
309- let block = Renderer.Block.Code_block { info_string; code } in
310- [ block ] @ to_markdown rest
000000000000000000000000000000000000000000000000000000000000000000000000000311 | Subpage subp :: _ -> subpage ~config ~resolve subp
312 | (Documented _ | Nested _) :: _ ->
313 let l, _, rest = take_descr t in
314- let one { attrs = _; anchor = _; code; doc; markers = _ } =
315- let content =
316- match code with
317- | `D code ->
318- let inline_source = inline ~config ~resolve code in
319- let inlines = Renderer.Inline.Inlines inline_source in
320- let block = Renderer.Block.Paragraph inlines in
321- [ block ]
322- | `N n -> to_markdown n
00000000000000000000000000000000000323 in
324- let block_doc = block ~config ~resolve doc in
325- List.append content block_doc
326 in
327- let all_blocks = List.concat_map one l in
328- all_blocks @ to_markdown rest
00000329 in
330 to_markdown t
331···393let inline ~config ~xref_base_uri b =
394 let resolve = Link.Base xref_base_uri in
395 inline ~config ~resolve b
0000396397let filepath ~config url = Link.Path.as_filename ~config url
···305 match header with Some header -> Some header | None -> None
306 in
307 let inline_source = source inline_text_only code in
308+ let initial_code = String.concat ~sep:"" inline_source in
309+310+ (* Check if the rest starts with Documented/Nested items - if so, combine them *)
311+ (match rest with
312+ | (Documented _ | Nested _) :: _ ->
313+ let l, _, remaining_rest = take_descr rest in
314+ (* Combine the initial code with the documented items *)
315+ let combine_code_with_docs initial_code items =
316+ let rec collect_lines acc = function
317+ | [] -> List.rev acc
318+ | { attrs = _; anchor = _; code; doc; markers = _ } :: rest ->
319+ let code_line = match code with
320+ | `D code ->
321+ let inline_source = inline ~config ~resolve code in
322+ let rec extract_all_text acc = function
323+ | [] -> List.rev acc
324+ | Renderer.Inline.Text s :: rest -> extract_all_text (s :: acc) rest
325+ | Renderer.Inline.Code_span code_list :: rest ->
326+ extract_all_text (String.concat ~sep:"" code_list :: acc) rest
327+ | Renderer.Inline.Inlines inlines :: rest ->
328+ extract_all_text (extract_all_text [] inlines @ acc) rest
329+ | Renderer.Inline.Emphasis inner :: rest ->
330+ extract_all_text (extract_all_text [] [inner] @ acc) rest
331+ | Renderer.Inline.Strong_emphasis inner :: rest ->
332+ extract_all_text (extract_all_text [] [inner] @ acc) rest
333+ | Renderer.Inline.Link { text; _ } :: rest ->
334+ extract_all_text (extract_all_text [] [text] @ acc) rest
335+ | Renderer.Inline.Image { text; _ } :: rest ->
336+ extract_all_text (extract_all_text [] [text] @ acc) rest
337+ | _ :: rest -> extract_all_text acc rest
338+ in
339+ let code_text = String.concat ~sep:"" (extract_all_text [] inline_source) in
340+ String.trim code_text
341+ | `N n ->
342+ (* For nested items, recursively process them *)
343+ let nested_blocks = to_markdown n in
344+ String.concat ~sep:"\n" (List.concat_map (function
345+ | Renderer.Block.Code_block { code; _ } -> code
346+ | _ -> []) nested_blocks)
347+ in
348+ let doc_comment = match doc with
349+ | [] -> ""
350+ | doc_blocks ->
351+ let doc_text = String.concat ~sep:"" (block_text_only doc_blocks) in
352+ let cleaned_text = String.trim doc_text in
353+ if cleaned_text = "" then ""
354+ else " (** " ^ cleaned_text ^ " *)"
355+ in
356+ let combined_line = code_line ^ doc_comment in
357+ collect_lines (combined_line :: acc) rest
358+ in
359+ let constructor_lines = collect_lines [] items in
360+ String.trim initial_code :: constructor_lines
361+ in
362+ let combined_lines = combine_code_with_docs initial_code l in
363+ (* Also collect any trailing Code items (like closing ']' for polymorphic variants) *)
364+ let rec collect_trailing_code items acc =
365+ match items with
366+ | (Code _ | Alternative _) :: _ ->
367+ let code, _, remaining = take_code items in
368+ let trailing_code = String.concat ~sep:"" (source inline_text_only code) in
369+ collect_trailing_code remaining (String.trim trailing_code :: acc)
370+ | rest -> (List.rev acc, rest)
371+ in
372+ let trailing_codes, final_rest = collect_trailing_code remaining_rest [] in
373+ let all_lines = combined_lines @ trailing_codes in
374+ if all_lines <> [] then
375+ let combined_code = String.concat ~sep:"\n" all_lines in
376+ let code_block = Renderer.Block.Code_block { info_string; code = [combined_code] } in
377+ [code_block] @ to_markdown final_rest
378+ else
379+ let code = [ initial_code ] in
380+ let block = Renderer.Block.Code_block { info_string; code } in
381+ [ block ] @ to_markdown rest
382+ | _ ->
383+ let code = [ initial_code ] in
384+ let block = Renderer.Block.Code_block { info_string; code } in
385+ [ block ] @ to_markdown rest)
386 | Subpage subp :: _ -> subpage ~config ~resolve subp
387 | (Documented _ | Nested _) :: _ ->
388 let l, _, rest = take_descr t in
389+ (* Combine code and documentation into a single code block with inline comments *)
390+ let combine_code_with_docs items =
391+ let rec collect_lines acc = function
392+ | [] -> List.rev acc
393+ | { attrs = _; anchor = _; code; doc; markers = _ } :: rest ->
394+ let code_line = match code with
395+ | `D code ->
396+ let inline_source = inline ~config ~resolve code in
397+ let rec extract_all_text acc = function
398+ | [] -> List.rev acc
399+ | Renderer.Inline.Text s :: rest -> extract_all_text (s :: acc) rest
400+ | Renderer.Inline.Code_span code_list :: rest ->
401+ extract_all_text (String.concat ~sep:"" code_list :: acc) rest
402+ | Renderer.Inline.Inlines inlines :: rest ->
403+ extract_all_text (extract_all_text [] inlines @ acc) rest
404+ | Renderer.Inline.Emphasis inner :: rest ->
405+ extract_all_text (extract_all_text [] [inner] @ acc) rest
406+ | Renderer.Inline.Strong_emphasis inner :: rest ->
407+ extract_all_text (extract_all_text [] [inner] @ acc) rest
408+ | Renderer.Inline.Link { text; _ } :: rest ->
409+ extract_all_text (extract_all_text [] [text] @ acc) rest
410+ | Renderer.Inline.Image { text; _ } :: rest ->
411+ extract_all_text (extract_all_text [] [text] @ acc) rest
412+ | _ :: rest -> extract_all_text acc rest
413+ in
414+ let code_text = String.concat ~sep:"" (extract_all_text [] inline_source) in
415+ String.trim code_text
416+ | `N n ->
417+ (* For nested items, recursively process them *)
418+ let nested_blocks = to_markdown n in
419+ String.concat ~sep:"\n" (List.concat_map (function
420+ | Renderer.Block.Code_block { code; _ } -> code
421+ | _ -> []) nested_blocks)
422+ in
423+ let doc_comment = match doc with
424+ | [] -> ""
425+ | doc_blocks ->
426+ let doc_text = String.concat ~sep:"" (block_text_only doc_blocks) in
427+ let cleaned_text = String.trim doc_text in
428+ if cleaned_text = "" then ""
429+ else " (** " ^ cleaned_text ^ " *)"
430+ in
431+ let combined_line = code_line ^ doc_comment in
432+ collect_lines (combined_line :: acc) rest
433 in
434+ collect_lines [] items
0435 in
436+ let combined_lines = combine_code_with_docs l in
437+ if combined_lines <> [] then
438+ let combined_code = String.concat ~sep:"\n" combined_lines in
439+ let code_block = Renderer.Block.Code_block { info_string = None; code = [combined_code] } in
440+ [code_block] @ to_markdown rest
441+ else
442+ to_markdown rest
443 in
444 to_markdown t
445···507let inline ~config ~xref_base_uri b =
508 let resolve = Link.Base xref_base_uri in
509 inline ~config ~resolve b
510+511+let block ~config ~xref_base_uri b =
512+ let resolve = Link.Base xref_base_uri in
513+ block ~config ~resolve b
514515let filepath ~config url = Link.Path.as_filename ~config url
+6
odoc/src/markdown2/generator.mli
···16 xref_base_uri:string ->
17 Odoc_document.Types.Inline.t ->
18 Renderer.Inline.t list
000000
···16 xref_base_uri:string ->
17 Odoc_document.Types.Inline.t ->
18 Renderer.Inline.t list
19+20+val block :
21+ config:Config.t ->
22+ xref_base_uri:string ->
23+ Odoc_document.Types.Block.one list ->
24+ Renderer.Block.t list
+1-1
odoc/src/odoc/odoc_file.ml
···29type t = { content : content; warnings : Odoc_model.Error.t list }
3031(** Written at the top of the files. Checked when loading. *)
32-let magic = "odoc-%%VERSION%%"
3334(** Exceptions while saving are allowed to leak. *)
35let save_ file f =
···29type t = { content : content; warnings : Odoc_model.Error.t list }
3031(** Written at the top of the files. Checked when loading. *)
32+let magic = "odoc-3.0.0"
3334(** Exceptions while saving are allowed to leak. *)
35let save_ file f =
···3\end{ocamlindent}%
4\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}Comment about X that should not appear when including X below.\end{ocamlindent}%
5\medbreak
6-\ocamltag{keyword}{include} \ocamltag{keyword}{module} \ocamltag{keyword}{type} \ocamltag{keyword}{of} \ocamltag{keyword}{struct} \ocamltag{keyword}{include} \hyperref[Include2-X]{\ocamlinlinecode{X}} \ocamltag{keyword}{end}\label{Include2--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = int}\\
7\label{Include2--module-Y}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Include2-Y]{\ocamlinlinecode{Y}}}\label{Include2-Y}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Include2-Y--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\
8\end{ocamlindent}%
9\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}Top-comment of Y.\end{ocamlindent}%
10\medbreak
11-\label{Include2--module-Y_include_synopsis}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Include2-Y_include_synopsis]{\ocamlinlinecode{Y\_\allowbreak{}include\_\allowbreak{}synopsis}}}\label{Include2-Y_include_synopsis}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\ocamltag{keyword}{include} \ocamltag{keyword}{module} \ocamltag{keyword}{type} \ocamltag{keyword}{of} \ocamltag{keyword}{struct} \ocamltag{keyword}{include} \hyperref[Include2-Y]{\ocamlinlinecode{Y}} \ocamltag{keyword}{end}\label{Include2-Y_include_synopsis--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Include2-Y--type-t]{\ocamlinlinecode{Y.\allowbreak{}t}}}\\
12\end{ocamlindent}%
13\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}The \ocamlinlinecode{include Y} below should have the synopsis from \ocamlinlinecode{Y}'s top-comment attached to it.\end{ocamlindent}%
14\medbreak
15-\label{Include2--module-Y_include_doc}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Include2-Y_include_doc]{\ocamlinlinecode{Y\_\allowbreak{}include\_\allowbreak{}doc}}}\label{Include2-Y_include_doc}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}Doc attached to \ocamlinlinecode{include Y}. \ocamlinlinecode{Y}'s top-comment shouldn't appear here.\ocamltag{keyword}{include} \ocamltag{keyword}{module} \ocamltag{keyword}{type} \ocamltag{keyword}{of} \ocamltag{keyword}{struct} \ocamltag{keyword}{include} \hyperref[Include2-Y]{\ocamlinlinecode{Y}} \ocamltag{keyword}{end}\label{Include2-Y_include_doc--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Include2-Y--type-t]{\ocamlinlinecode{Y.\allowbreak{}t}}}\\
16\end{ocamlindent}%
17\ocamlcodefragment{\ocamltag{keyword}{end}}\\
18
···3\end{ocamlindent}%
4\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}Comment about X that should not appear when including X below.\end{ocamlindent}%
5\medbreak
6+\ocamltag{keyword}{include} \ocamltag{keyword}{module} \ocamltag{keyword}{type} \ocamltag{keyword}{of} \ocamltag{keyword}{struct} \ocamltag{keyword}{include} \hyperref[Include2-X]{\ocamlinlinecode{Include2.\allowbreak{}X}} \ocamltag{keyword}{end}\label{Include2--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = int}\\
7\label{Include2--module-Y}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Include2-Y]{\ocamlinlinecode{Y}}}\label{Include2-Y}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Include2-Y--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\
8\end{ocamlindent}%
9\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}Top-comment of Y.\end{ocamlindent}%
10\medbreak
11+\label{Include2--module-Y_include_synopsis}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Include2-Y_include_synopsis]{\ocamlinlinecode{Y\_\allowbreak{}include\_\allowbreak{}synopsis}}}\label{Include2-Y_include_synopsis}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\ocamltag{keyword}{include} \ocamltag{keyword}{module} \ocamltag{keyword}{type} \ocamltag{keyword}{of} \ocamltag{keyword}{struct} \ocamltag{keyword}{include} \hyperref[Include2-Y]{\ocamlinlinecode{Include2.\allowbreak{}Y}} \ocamltag{keyword}{end}\label{Include2-Y_include_synopsis--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Include2-Y--type-t]{\ocamlinlinecode{Include2.\allowbreak{}Y.\allowbreak{}t}}}\\
12\end{ocamlindent}%
13\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}The \ocamlinlinecode{include Y} below should have the synopsis from \ocamlinlinecode{Y}'s top-comment attached to it.\end{ocamlindent}%
14\medbreak
15+\label{Include2--module-Y_include_doc}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Include2-Y_include_doc]{\ocamlinlinecode{Y\_\allowbreak{}include\_\allowbreak{}doc}}}\label{Include2-Y_include_doc}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}Doc attached to \ocamlinlinecode{include Y}. \ocamlinlinecode{Y}'s top-comment shouldn't appear here.\ocamltag{keyword}{include} \ocamltag{keyword}{module} \ocamltag{keyword}{type} \ocamltag{keyword}{of} \ocamltag{keyword}{struct} \ocamltag{keyword}{include} \hyperref[Include2-Y]{\ocamlinlinecode{Include2.\allowbreak{}Y}} \ocamltag{keyword}{end}\label{Include2-Y_include_doc--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Include2-Y--type-t]{\ocamlinlinecode{Include2.\allowbreak{}Y.\allowbreak{}t}}}\\
16\end{ocamlindent}%
17\ocamlcodefragment{\ocamltag{keyword}{end}}\\
18
+4-4
odoc/test/generators/latex/Include_sections.tex
···15\medbreak
16Let's include \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{\ocamlinlinecode{Something}}[p\pageref*{Include_sections-module-type-Something}]} once
1718-\ocamltag{keyword}{include} \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{Something}}\subsection{Something 1\label{Include_sections--something-1_2}}%
19foo
2021\subsubsection{Something 2\label{Include_sections--something-2_2}}%
···25\subsection{Second include\label{Include_sections--second-include}}%
26Let's include \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{\ocamlinlinecode{Something}}[p\pageref*{Include_sections-module-type-Something}]} a second time: the heading level should be shift here.
2728-\ocamltag{keyword}{include} \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{Something}}\subsection{Something 1\label{Include_sections--something-1_3}}%
29foo
3031\subsubsection{Something 2\label{Include_sections--something-2_3}}%
···35\subsubsection{Third include\label{Include_sections--third-include}}%
36Shifted some more.
3738-\ocamltag{keyword}{include} \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{Something}}\subsection{Something 1\label{Include_sections--something-1_4}}%
39foo
4041\subsubsection{Something 2\label{Include_sections--something-2_4}}%
···4445And let's include it again, but without inlining it this time: the ToC shouldn't grow.
4647-\ocamltag{keyword}{include} \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{Something}}\label{Include_sections--val-something}\ocamlcodefragment{\ocamltag{keyword}{val} something : unit}\\
48\subsection{Something 1\label{Include_sections--something-1_5}}%
49foo
50
···15\medbreak
16Let's include \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{\ocamlinlinecode{Something}}[p\pageref*{Include_sections-module-type-Something}]} once
1718+\ocamltag{keyword}{include} \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{Include\_\allowbreak{}sections.\allowbreak{}Something}}\subsection{Something 1\label{Include_sections--something-1_2}}%
19foo
2021\subsubsection{Something 2\label{Include_sections--something-2_2}}%
···25\subsection{Second include\label{Include_sections--second-include}}%
26Let's include \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{\ocamlinlinecode{Something}}[p\pageref*{Include_sections-module-type-Something}]} a second time: the heading level should be shift here.
2728+\ocamltag{keyword}{include} \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{Include\_\allowbreak{}sections.\allowbreak{}Something}}\subsection{Something 1\label{Include_sections--something-1_3}}%
29foo
3031\subsubsection{Something 2\label{Include_sections--something-2_3}}%
···35\subsubsection{Third include\label{Include_sections--third-include}}%
36Shifted some more.
3738+\ocamltag{keyword}{include} \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{Include\_\allowbreak{}sections.\allowbreak{}Something}}\subsection{Something 1\label{Include_sections--something-1_4}}%
39foo
4041\subsubsection{Something 2\label{Include_sections--something-2_4}}%
···4445And let's include it again, but without inlining it this time: the ToC shouldn't grow.
4647+\ocamltag{keyword}{include} \hyperref[Include_sections-module-type-Something]{\ocamlinlinecode{Include\_\allowbreak{}sections.\allowbreak{}Something}}\label{Include_sections--val-something}\ocamlcodefragment{\ocamltag{keyword}{val} something : unit}\\
48\subsection{Something 1\label{Include_sections--something-1_5}}%
49foo
50
+6-6
odoc/test/generators/latex/Labels.tex
···6\ocamlcodefragment{\ocamltag{keyword}{end}}\\
7\label{Labels--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\begin{ocamlindent}Attached to type\end{ocamlindent}%
8\medbreak
9-\label{Labels--val-f}\ocamlcodefragment{\ocamltag{keyword}{val} f : \hyperref[Labels--type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent}Attached to value\end{ocamlindent}%
10\medbreak
11-\label{Labels--val-e}\ocamlcodefragment{\ocamltag{keyword}{val} e : unit \ocamltag{arrow}{$\rightarrow$} \hyperref[Labels--type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent}Attached to external\end{ocamlindent}%
12\medbreak
13\label{Labels--module-type-S}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Labels-module-type-S]{\ocamlinlinecode{S}}}\label{Labels-module-type-S}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{Attached to module type\label{Labels-module-type-S--L6}}%
14\end{ocamlindent}%
···20\label{Labels--exception-E}\ocamlcodefragment{\ocamltag{keyword}{exception} \ocamltag{exception}{E}}\begin{ocamlindent}Attached to exception\end{ocamlindent}%
21\medbreak
22\label{Labels--type-x}\ocamlcodefragment{\ocamltag{keyword}{type} x = .\allowbreak{}.\allowbreak{}}\\
23-\label{Labels--extension-decl-X}\ocamlcodefragment{\ocamltag{keyword}{type} \hyperref[Labels--type-x]{\ocamlinlinecode{x}} += }\\
24\begin{ocamltabular}{p{1.000\textwidth}}\ocamlcodefragment{| \ocamltag{extension}{X}}\label{Labels--extension-X}\\
25\end{ocamltabular}%
26\\
27\begin{ocamlindent}Attached to extension\end{ocamlindent}%
28\medbreak
29-\label{Labels--module-S}\ocamlcodefragment{\ocamltag{keyword}{module} S := \hyperref[Labels-A]{\ocamlinlinecode{A}}}\begin{ocamlindent}Attached to module subst\end{ocamlindent}%
30\medbreak
31-\label{Labels--type-s}\ocamlcodefragment{\ocamltag{keyword}{type} s := \hyperref[Labels--type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent}Attached to type subst\end{ocamlindent}%
32\medbreak
33\label{Labels--type-u}\ocamlcodefragment{\ocamltag{keyword}{type} u = }\\
34\begin{ocamltabular}{p{0.500\textwidth}p{0.500\textwidth}}\ocamlcodefragment{| \ocamltag{constructor}{A'}}\label{Labels--type-u.A'}& Attached to constructor\\
35\end{ocamltabular}%
36\\
37\label{Labels--type-v}\ocamlcodefragment{\ocamltag{keyword}{type} v = \{}\\
38-\begin{ocamltabular}{p{0.500\textwidth}p{0.500\textwidth}}\ocamlinlinecode{f : \hyperref[Labels--type-t]{\ocamlinlinecode{t}};\allowbreak{}}\label{Labels--type-v.f}& Attached to field\\
39\end{ocamltabular}%
40\\
41\ocamlcodefragment{\}}\\
···6\ocamlcodefragment{\ocamltag{keyword}{end}}\\
7\label{Labels--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\begin{ocamlindent}Attached to type\end{ocamlindent}%
8\medbreak
9+\label{Labels--val-f}\ocamlcodefragment{\ocamltag{keyword}{val} f : \hyperref[Labels--type-t]{\ocamlinlinecode{Labels.\allowbreak{}t}}}\begin{ocamlindent}Attached to value\end{ocamlindent}%
10\medbreak
11+\label{Labels--val-e}\ocamlcodefragment{\ocamltag{keyword}{val} e : unit \ocamltag{arrow}{$\rightarrow$} \hyperref[Labels--type-t]{\ocamlinlinecode{Labels.\allowbreak{}t}}}\begin{ocamlindent}Attached to external\end{ocamlindent}%
12\medbreak
13\label{Labels--module-type-S}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Labels-module-type-S]{\ocamlinlinecode{S}}}\label{Labels-module-type-S}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{Attached to module type\label{Labels-module-type-S--L6}}%
14\end{ocamlindent}%
···20\label{Labels--exception-E}\ocamlcodefragment{\ocamltag{keyword}{exception} \ocamltag{exception}{E}}\begin{ocamlindent}Attached to exception\end{ocamlindent}%
21\medbreak
22\label{Labels--type-x}\ocamlcodefragment{\ocamltag{keyword}{type} x = .\allowbreak{}.\allowbreak{}}\\
23+\label{Labels--extension-decl-X}\ocamlcodefragment{\ocamltag{keyword}{type} \hyperref[Labels--type-x]{\ocamlinlinecode{Labels.\allowbreak{}x}} += }\\
24\begin{ocamltabular}{p{1.000\textwidth}}\ocamlcodefragment{| \ocamltag{extension}{X}}\label{Labels--extension-X}\\
25\end{ocamltabular}%
26\\
27\begin{ocamlindent}Attached to extension\end{ocamlindent}%
28\medbreak
29+\label{Labels--module-S}\ocamlcodefragment{\ocamltag{keyword}{module} S := \hyperref[Labels-A]{\ocamlinlinecode{Labels.\allowbreak{}A}}}\begin{ocamlindent}Attached to module subst\end{ocamlindent}%
30\medbreak
31+\label{Labels--type-s}\ocamlcodefragment{\ocamltag{keyword}{type} s := \hyperref[Labels--type-t]{\ocamlinlinecode{Labels.\allowbreak{}t}}}\begin{ocamlindent}Attached to type subst\end{ocamlindent}%
32\medbreak
33\label{Labels--type-u}\ocamlcodefragment{\ocamltag{keyword}{type} u = }\\
34\begin{ocamltabular}{p{0.500\textwidth}p{0.500\textwidth}}\ocamlcodefragment{| \ocamltag{constructor}{A'}}\label{Labels--type-u.A'}& Attached to constructor\\
35\end{ocamltabular}%
36\\
37\label{Labels--type-v}\ocamlcodefragment{\ocamltag{keyword}{type} v = \{}\\
38+\begin{ocamltabular}{p{0.500\textwidth}p{0.500\textwidth}}\ocamlinlinecode{f : \hyperref[Labels--type-t]{\ocamlinlinecode{Labels.\allowbreak{}t}};\allowbreak{}}\label{Labels--type-v.f}& Attached to field\\
39\end{ocamltabular}%
40\\
41\ocamlcodefragment{\}}\\
+2-2
odoc/test/generators/latex/Module.tex
···12\end{ocamlindent}%
13\ocamlcodefragment{\ocamltag{keyword}{end}}\\
14\label{Module--module-type-S1}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} S1}\\
15-\label{Module--module-type-S2}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} S2 = \hyperref[Module-module-type-S]{\ocamlinlinecode{S}}}\\
16\label{Module--module-type-S3}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Module-module-type-S3]{\ocamlinlinecode{S3}}}\label{Module-module-type-S3}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Module-module-type-S3--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = int}\\
17\label{Module-module-type-S3--type-u}\ocamlcodefragment{\ocamltag{keyword}{type} u = string}\\
18\label{Module-module-type-S3--type-v}\ocamlcodefragment{\ocamltag{keyword}{type} 'a v}\\
···49\label{Module-module-type-S7--type-u}\ocamlcodefragment{\ocamltag{keyword}{type} u}\\
50\label{Module-module-type-S7--type-v}\ocamlcodefragment{\ocamltag{keyword}{type} 'a v}\\
51\label{Module-module-type-S7--type-w}\ocamlcodefragment{\ocamltag{keyword}{type} ('a,\allowbreak{} 'b) w}\\
52-\label{Module-module-type-S7--module-M}\ocamlcodefragment{\ocamltag{keyword}{module} M = \hyperref[Module-M']{\ocamlinlinecode{M'}}}\\
53\end{ocamlindent}%
54\ocamlcodefragment{\ocamltag{keyword}{end}}\\
55\label{Module--module-type-S8}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Module-module-type-S8]{\ocamlinlinecode{S8}}}\label{Module-module-type-S8}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Module-module-type-S8--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\
···12\end{ocamlindent}%
13\ocamlcodefragment{\ocamltag{keyword}{end}}\\
14\label{Module--module-type-S1}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} S1}\\
15+\label{Module--module-type-S2}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} S2 = \hyperref[Module-module-type-S]{\ocamlinlinecode{Module.\allowbreak{}S}}}\\
16\label{Module--module-type-S3}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Module-module-type-S3]{\ocamlinlinecode{S3}}}\label{Module-module-type-S3}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Module-module-type-S3--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = int}\\
17\label{Module-module-type-S3--type-u}\ocamlcodefragment{\ocamltag{keyword}{type} u = string}\\
18\label{Module-module-type-S3--type-v}\ocamlcodefragment{\ocamltag{keyword}{type} 'a v}\\
···49\label{Module-module-type-S7--type-u}\ocamlcodefragment{\ocamltag{keyword}{type} u}\\
50\label{Module-module-type-S7--type-v}\ocamlcodefragment{\ocamltag{keyword}{type} 'a v}\\
51\label{Module-module-type-S7--type-w}\ocamlcodefragment{\ocamltag{keyword}{type} ('a,\allowbreak{} 'b) w}\\
52+\label{Module-module-type-S7--module-M}\ocamlcodefragment{\ocamltag{keyword}{module} M = \hyperref[Module-M']{\ocamlinlinecode{Module.\allowbreak{}M'}}}\\
53\end{ocamlindent}%
54\ocamlcodefragment{\ocamltag{keyword}{end}}\\
55\label{Module--module-type-S8}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Module-module-type-S8]{\ocamlinlinecode{S8}}}\label{Module-module-type-S8}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Module-module-type-S8--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\
···8\label{Nested-F-argument-1-Arg1--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\begin{ocamlindent}Some type.\end{ocamlindent}%
9\medbreak
10\subsubsection{Values\label{Nested-F-argument-1-Arg1--values}}%
11-\label{Nested-F-argument-1-Arg1--val-y}\ocamlcodefragment{\ocamltag{keyword}{val} y : \hyperref[Nested-F-argument-1-Arg1--type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent}The value of y.\end{ocamlindent}%
12\medbreak
13\end{ocamlindent}%
14\ocamlcodefragment{\ocamltag{keyword}{end}}\\
···8\label{Nested-F-argument-1-Arg1--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\begin{ocamlindent}Some type.\end{ocamlindent}%
9\medbreak
10\subsubsection{Values\label{Nested-F-argument-1-Arg1--values}}%
11+\label{Nested-F-argument-1-Arg1--val-y}\ocamlcodefragment{\ocamltag{keyword}{val} y : \hyperref[Nested-F-argument-1-Arg1--type-t]{\ocamlinlinecode{Arg1.\allowbreak{}t}}}\begin{ocamlindent}The value of y.\end{ocamlindent}%
12\medbreak
13\end{ocamlindent}%
14\ocamlcodefragment{\ocamltag{keyword}{end}}\\
+2-2
odoc/test/generators/latex/Nested.tex
···6\label{Nested-X--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\begin{ocamlindent}Some type.\end{ocamlindent}%
7\medbreak
8\subsubsection{Values\label{Nested-X--values}}%
9-\label{Nested-X--val-x}\ocamlcodefragment{\ocamltag{keyword}{val} x : \hyperref[Nested-X--type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent}The value of x.\end{ocamlindent}%
10\medbreak
11\end{ocamlindent}%
12\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This is module X.\end{ocamlindent}%
···22\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This is module type Y.\end{ocamlindent}%
23\medbreak
24\subsection{Functor\label{Nested--functor}}%
25-\label{Nested--module-F}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Nested-F]{\ocamlinlinecode{F}}}\ocamlcodefragment{ (\hyperref[Nested-F-argument-1-Arg1]{\ocamlinlinecode{Arg1}} : \hyperref[Nested-module-type-Y]{\ocamlinlinecode{Y}}) (\hyperref[Nested-F-argument-2-Arg2]{\ocamlinlinecode{Arg2}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\begin{ocamlindent}This is a functor F.\end{ocamlindent}%
26\medbreak
27\subsection{Class\label{Nested--class}}%
28\label{Nested--class-z}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{virtual} \hyperref[Nested-class-z]{\ocamlinlinecode{z}}}\ocamlcodefragment{ : \ocamltag{keyword}{object} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\begin{ocamlindent}This is class z.\end{ocamlindent}%
···6\label{Nested-X--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\begin{ocamlindent}Some type.\end{ocamlindent}%
7\medbreak
8\subsubsection{Values\label{Nested-X--values}}%
9+\label{Nested-X--val-x}\ocamlcodefragment{\ocamltag{keyword}{val} x : \hyperref[Nested-X--type-t]{\ocamlinlinecode{Nested.\allowbreak{}X.\allowbreak{}t}}}\begin{ocamlindent}The value of x.\end{ocamlindent}%
10\medbreak
11\end{ocamlindent}%
12\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This is module X.\end{ocamlindent}%
···22\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This is module type Y.\end{ocamlindent}%
23\medbreak
24\subsection{Functor\label{Nested--functor}}%
25+\label{Nested--module-F}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Nested-F]{\ocamlinlinecode{F}}}\ocamlcodefragment{ (\hyperref[Nested-F-argument-1-Arg1]{\ocamlinlinecode{Arg1}} : \hyperref[Nested-module-type-Y]{\ocamlinlinecode{Nested.\allowbreak{}Y}}) (\hyperref[Nested-F-argument-2-Arg2]{\ocamlinlinecode{Arg2}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\begin{ocamlindent}This is a functor F.\end{ocamlindent}%
26\medbreak
27\subsection{Class\label{Nested--class}}%
28\label{Nested--class-z}\ocamlcodefragment{\ocamltag{keyword}{class} \ocamltag{keyword}{virtual} \hyperref[Nested-class-z]{\ocamlinlinecode{z}}}\ocamlcodefragment{ : \ocamltag{keyword}{object} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\begin{ocamlindent}This is class z.\end{ocamlindent}%
···5\label{Ocamlary-FunctorTypeOf--argument-1-Collection}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Ocamlary-FunctorTypeOf-argument-1-Collection]{\ocamlinlinecode{Collection}}}\label{Ocamlary-FunctorTypeOf-argument-1-Collection}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-FunctorTypeOf-argument-1-Collection--type-collection}\ocamlcodefragment{\ocamltag{keyword}{type} collection}\begin{ocamlindent}This comment is for \ocamlinlinecode{collection}.\end{ocamlindent}%
6\medbreak
7\label{Ocamlary-FunctorTypeOf-argument-1-Collection--type-element}\ocamlcodefragment{\ocamltag{keyword}{type} element}\\
8-\label{Ocamlary-FunctorTypeOf-argument-1-Collection--module-InnerModuleA}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA]{\ocamlinlinecode{InnerModuleA}}}\label{Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Ocamlary-FunctorTypeOf-argument-1-Collection--type-collection]{\ocamlinlinecode{collection}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
9\medbreak
10-\label{Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA--module-InnerModuleA'}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA-InnerModuleA']{\ocamlinlinecode{InnerModuleA'}}}\label{Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA-InnerModuleA'}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA-InnerModuleA'--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = (unit,\allowbreak{} unit) \hyperref[Ocamlary--type-a_function]{\ocamlinlinecode{a\_\allowbreak{}function}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
11\medbreak
12\end{ocamlindent}%
13\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleA'}.\end{ocamlindent}%
14\medbreak
15-\label{Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA--module-type-InnerModuleTypeA'}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA-module-type-InnerModuleTypeA']{\ocamlinlinecode{InnerModuleTypeA'}}}\label{Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA-module-type-InnerModuleTypeA'}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA-module-type-InnerModuleTypeA'--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA-InnerModuleA'--type-t]{\ocamlinlinecode{InnerModuleA'.\allowbreak{}t}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
16\medbreak
17\end{ocamlindent}%
18\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleTypeA'}.\end{ocamlindent}%
···20\end{ocamlindent}%
21\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleA}.\end{ocamlindent}%
22\medbreak
23-\label{Ocamlary-FunctorTypeOf-argument-1-Collection--module-type-InnerModuleTypeA}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} InnerModuleTypeA = \hyperref[Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA-module-type-InnerModuleTypeA']{\ocamlinlinecode{InnerModuleA.\allowbreak{}InnerModuleTypeA'}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleTypeA}.\end{ocamlindent}%
24\medbreak
25\end{ocamlindent}%
26\ocamlcodefragment{\ocamltag{keyword}{end}}\\
···5\label{Ocamlary-FunctorTypeOf--argument-1-Collection}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Ocamlary-FunctorTypeOf-argument-1-Collection]{\ocamlinlinecode{Collection}}}\label{Ocamlary-FunctorTypeOf-argument-1-Collection}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-FunctorTypeOf-argument-1-Collection--type-collection}\ocamlcodefragment{\ocamltag{keyword}{type} collection}\begin{ocamlindent}This comment is for \ocamlinlinecode{collection}.\end{ocamlindent}%
6\medbreak
7\label{Ocamlary-FunctorTypeOf-argument-1-Collection--type-element}\ocamlcodefragment{\ocamltag{keyword}{type} element}\\
8+\label{Ocamlary-FunctorTypeOf-argument-1-Collection--module-InnerModuleA}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA]{\ocamlinlinecode{InnerModuleA}}}\label{Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Ocamlary-FunctorTypeOf-argument-1-Collection--type-collection]{\ocamlinlinecode{Collection.\allowbreak{}collection}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
9\medbreak
10+\label{Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA--module-InnerModuleA'}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA-InnerModuleA']{\ocamlinlinecode{InnerModuleA'}}}\label{Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA-InnerModuleA'}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA-InnerModuleA'--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = (unit,\allowbreak{} unit) \hyperref[Ocamlary--type-a_function]{\ocamlinlinecode{Ocamlary.\allowbreak{}a\_\allowbreak{}function}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
11\medbreak
12\end{ocamlindent}%
13\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleA'}.\end{ocamlindent}%
14\medbreak
15+\label{Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA--module-type-InnerModuleTypeA'}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA-module-type-InnerModuleTypeA']{\ocamlinlinecode{InnerModuleTypeA'}}}\label{Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA-module-type-InnerModuleTypeA'}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA-module-type-InnerModuleTypeA'--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA-InnerModuleA'--type-t]{\ocamlinlinecode{Collection.\allowbreak{}InnerModuleA.\allowbreak{}InnerModuleA'.\allowbreak{}t}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
16\medbreak
17\end{ocamlindent}%
18\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleTypeA'}.\end{ocamlindent}%
···20\end{ocamlindent}%
21\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleA}.\end{ocamlindent}%
22\medbreak
23+\label{Ocamlary-FunctorTypeOf-argument-1-Collection--module-type-InnerModuleTypeA}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} InnerModuleTypeA = \hyperref[Ocamlary-FunctorTypeOf-argument-1-Collection-InnerModuleA-module-type-InnerModuleTypeA']{\ocamlinlinecode{Collection.\allowbreak{}InnerModuleA.\allowbreak{}InnerModuleTypeA'}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleTypeA}.\end{ocamlindent}%
24\medbreak
25\end{ocamlindent}%
26\ocamlcodefragment{\ocamltag{keyword}{end}}\\
···5\label{Ocamlary-Recollection--argument-1-C}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Ocamlary-Recollection-argument-1-C]{\ocamlinlinecode{C}}}\label{Ocamlary-Recollection-argument-1-C}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-Recollection-argument-1-C--type-collection}\ocamlcodefragment{\ocamltag{keyword}{type} collection}\begin{ocamlindent}This comment is for \ocamlinlinecode{collection}.\end{ocamlindent}%
6\medbreak
7\label{Ocamlary-Recollection-argument-1-C--type-element}\ocamlcodefragment{\ocamltag{keyword}{type} element}\\
8-\label{Ocamlary-Recollection-argument-1-C--module-InnerModuleA}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Ocamlary-Recollection-argument-1-C-InnerModuleA]{\ocamlinlinecode{InnerModuleA}}}\label{Ocamlary-Recollection-argument-1-C-InnerModuleA}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-Recollection-argument-1-C-InnerModuleA--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Ocamlary-Recollection-argument-1-C--type-collection]{\ocamlinlinecode{collection}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
9\medbreak
10-\label{Ocamlary-Recollection-argument-1-C-InnerModuleA--module-InnerModuleA'}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Ocamlary-Recollection-argument-1-C-InnerModuleA-InnerModuleA']{\ocamlinlinecode{InnerModuleA'}}}\label{Ocamlary-Recollection-argument-1-C-InnerModuleA-InnerModuleA'}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-Recollection-argument-1-C-InnerModuleA-InnerModuleA'--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = (unit,\allowbreak{} unit) \hyperref[Ocamlary--type-a_function]{\ocamlinlinecode{a\_\allowbreak{}function}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
11\medbreak
12\end{ocamlindent}%
13\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleA'}.\end{ocamlindent}%
14\medbreak
15-\label{Ocamlary-Recollection-argument-1-C-InnerModuleA--module-type-InnerModuleTypeA'}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Ocamlary-Recollection-argument-1-C-InnerModuleA-module-type-InnerModuleTypeA']{\ocamlinlinecode{InnerModuleTypeA'}}}\label{Ocamlary-Recollection-argument-1-C-InnerModuleA-module-type-InnerModuleTypeA'}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-Recollection-argument-1-C-InnerModuleA-module-type-InnerModuleTypeA'--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Ocamlary-Recollection-argument-1-C-InnerModuleA-InnerModuleA'--type-t]{\ocamlinlinecode{InnerModuleA'.\allowbreak{}t}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
16\medbreak
17\end{ocamlindent}%
18\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleTypeA'}.\end{ocamlindent}%
···20\end{ocamlindent}%
21\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleA}.\end{ocamlindent}%
22\medbreak
23-\label{Ocamlary-Recollection-argument-1-C--module-type-InnerModuleTypeA}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} InnerModuleTypeA = \hyperref[Ocamlary-Recollection-argument-1-C-InnerModuleA-module-type-InnerModuleTypeA']{\ocamlinlinecode{InnerModuleA.\allowbreak{}InnerModuleTypeA'}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleTypeA}.\end{ocamlindent}%
24\medbreak
25\end{ocamlindent}%
26\ocamlcodefragment{\ocamltag{keyword}{end}}\\
···30\label{Ocamlary-Recollection--type-element}\ocamlcodefragment{\ocamltag{keyword}{type} element = \hyperref[Ocamlary-Recollection-argument-1-C--type-collection]{\ocamlinlinecode{C.\allowbreak{}collection}}}\\
31\label{Ocamlary-Recollection--module-InnerModuleA}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Ocamlary-Recollection-InnerModuleA]{\ocamlinlinecode{InnerModuleA}}}\label{Ocamlary-Recollection-InnerModuleA}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-Recollection-InnerModuleA--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Ocamlary-Recollection--type-collection]{\ocamlinlinecode{collection}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
32\medbreak
33-\label{Ocamlary-Recollection-InnerModuleA--module-InnerModuleA'}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Ocamlary-Recollection-InnerModuleA-InnerModuleA']{\ocamlinlinecode{InnerModuleA'}}}\label{Ocamlary-Recollection-InnerModuleA-InnerModuleA'}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-Recollection-InnerModuleA-InnerModuleA'--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = (unit,\allowbreak{} unit) \hyperref[Ocamlary--type-a_function]{\ocamlinlinecode{a\_\allowbreak{}function}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
34\medbreak
35\end{ocamlindent}%
36\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleA'}.\end{ocamlindent}%
37\medbreak
38-\label{Ocamlary-Recollection-InnerModuleA--module-type-InnerModuleTypeA'}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Ocamlary-Recollection-InnerModuleA-module-type-InnerModuleTypeA']{\ocamlinlinecode{InnerModuleTypeA'}}}\label{Ocamlary-Recollection-InnerModuleA-module-type-InnerModuleTypeA'}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-Recollection-InnerModuleA-module-type-InnerModuleTypeA'--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Ocamlary-Recollection-InnerModuleA-InnerModuleA'--type-t]{\ocamlinlinecode{InnerModuleA'.\allowbreak{}t}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
39\medbreak
40\end{ocamlindent}%
41\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleTypeA'}.\end{ocamlindent}%
···5\label{Ocamlary-Recollection--argument-1-C}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Ocamlary-Recollection-argument-1-C]{\ocamlinlinecode{C}}}\label{Ocamlary-Recollection-argument-1-C}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-Recollection-argument-1-C--type-collection}\ocamlcodefragment{\ocamltag{keyword}{type} collection}\begin{ocamlindent}This comment is for \ocamlinlinecode{collection}.\end{ocamlindent}%
6\medbreak
7\label{Ocamlary-Recollection-argument-1-C--type-element}\ocamlcodefragment{\ocamltag{keyword}{type} element}\\
8+\label{Ocamlary-Recollection-argument-1-C--module-InnerModuleA}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Ocamlary-Recollection-argument-1-C-InnerModuleA]{\ocamlinlinecode{InnerModuleA}}}\label{Ocamlary-Recollection-argument-1-C-InnerModuleA}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-Recollection-argument-1-C-InnerModuleA--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Ocamlary-Recollection-argument-1-C--type-collection]{\ocamlinlinecode{C.\allowbreak{}collection}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
9\medbreak
10+\label{Ocamlary-Recollection-argument-1-C-InnerModuleA--module-InnerModuleA'}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Ocamlary-Recollection-argument-1-C-InnerModuleA-InnerModuleA']{\ocamlinlinecode{InnerModuleA'}}}\label{Ocamlary-Recollection-argument-1-C-InnerModuleA-InnerModuleA'}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-Recollection-argument-1-C-InnerModuleA-InnerModuleA'--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = (unit,\allowbreak{} unit) \hyperref[Ocamlary--type-a_function]{\ocamlinlinecode{Ocamlary.\allowbreak{}a\_\allowbreak{}function}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
11\medbreak
12\end{ocamlindent}%
13\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleA'}.\end{ocamlindent}%
14\medbreak
15+\label{Ocamlary-Recollection-argument-1-C-InnerModuleA--module-type-InnerModuleTypeA'}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Ocamlary-Recollection-argument-1-C-InnerModuleA-module-type-InnerModuleTypeA']{\ocamlinlinecode{InnerModuleTypeA'}}}\label{Ocamlary-Recollection-argument-1-C-InnerModuleA-module-type-InnerModuleTypeA'}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-Recollection-argument-1-C-InnerModuleA-module-type-InnerModuleTypeA'--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Ocamlary-Recollection-argument-1-C-InnerModuleA-InnerModuleA'--type-t]{\ocamlinlinecode{C.\allowbreak{}InnerModuleA.\allowbreak{}InnerModuleA'.\allowbreak{}t}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
16\medbreak
17\end{ocamlindent}%
18\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleTypeA'}.\end{ocamlindent}%
···20\end{ocamlindent}%
21\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleA}.\end{ocamlindent}%
22\medbreak
23+\label{Ocamlary-Recollection-argument-1-C--module-type-InnerModuleTypeA}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} InnerModuleTypeA = \hyperref[Ocamlary-Recollection-argument-1-C-InnerModuleA-module-type-InnerModuleTypeA']{\ocamlinlinecode{C.\allowbreak{}InnerModuleA.\allowbreak{}InnerModuleTypeA'}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleTypeA}.\end{ocamlindent}%
24\medbreak
25\end{ocamlindent}%
26\ocamlcodefragment{\ocamltag{keyword}{end}}\\
···30\label{Ocamlary-Recollection--type-element}\ocamlcodefragment{\ocamltag{keyword}{type} element = \hyperref[Ocamlary-Recollection-argument-1-C--type-collection]{\ocamlinlinecode{C.\allowbreak{}collection}}}\\
31\label{Ocamlary-Recollection--module-InnerModuleA}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Ocamlary-Recollection-InnerModuleA]{\ocamlinlinecode{InnerModuleA}}}\label{Ocamlary-Recollection-InnerModuleA}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-Recollection-InnerModuleA--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Ocamlary-Recollection--type-collection]{\ocamlinlinecode{collection}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
32\medbreak
33+\label{Ocamlary-Recollection-InnerModuleA--module-InnerModuleA'}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Ocamlary-Recollection-InnerModuleA-InnerModuleA']{\ocamlinlinecode{InnerModuleA'}}}\label{Ocamlary-Recollection-InnerModuleA-InnerModuleA'}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-Recollection-InnerModuleA-InnerModuleA'--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = (unit,\allowbreak{} unit) \hyperref[Ocamlary--type-a_function]{\ocamlinlinecode{Ocamlary.\allowbreak{}a\_\allowbreak{}function}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
34\medbreak
35\end{ocamlindent}%
36\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleA'}.\end{ocamlindent}%
37\medbreak
38+\label{Ocamlary-Recollection-InnerModuleA--module-type-InnerModuleTypeA'}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Ocamlary-Recollection-InnerModuleA-module-type-InnerModuleTypeA']{\ocamlinlinecode{InnerModuleTypeA'}}}\label{Ocamlary-Recollection-InnerModuleA-module-type-InnerModuleTypeA'}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Ocamlary-Recollection-InnerModuleA-module-type-InnerModuleTypeA'--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = \hyperref[Ocamlary-Recollection-InnerModuleA-InnerModuleA'--type-t]{\ocamlinlinecode{InnerModuleA.\allowbreak{}InnerModuleA'.\allowbreak{}t}}}\begin{ocamlindent}This comment is for \ocamlinlinecode{t}.\end{ocamlindent}%
39\medbreak
40\end{ocamlindent}%
41\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This comment is for \ocamlinlinecode{InnerModuleTypeA'}.\end{ocamlindent}%
···14.SH Documentation
15.sp
16.nf
17-\f[CB]type\fR t = Y\.t
···14.SH Documentation
15.sp
16.nf
17+\f[CB]type\fR t = Include2\.Y\.t
+6-6
odoc/test/generators/man/Labels.3o
···29Attached to type
30.nf
31.sp
32-\f[CB]val\fR f : t
33.fi
34.br
35.ti +2
36Attached to value
37.nf
38.sp
39-\f[CB]val\fR e : unit \f[CB]\->\fR t
40.fi
41.br
42.ti +2
···78.sp
79\f[CB]type\fR x = \.\.
80.sp
81-\f[CB]type\fR x +=
82.br
83.ti +2
84| \f[CB]X\fR
···89Attached to extension
90.nf
91.sp
92-\f[CB]module\fR S := A
93.fi
94.br
95.ti +2
96Attached to module subst
97.nf
98.sp
99-\f[CB]type\fR s := t
100.fi
101.br
102.ti +2
···115\f[CB]type\fR v = {
116.br
117.ti +2
118-f : t;
119.br
120.ti +4
121(* Attached to field *)
···29Attached to type
30.nf
31.sp
32+\f[CB]val\fR f : Labels\.t
33.fi
34.br
35.ti +2
36Attached to value
37.nf
38.sp
39+\f[CB]val\fR e : unit \f[CB]\->\fR Labels\.t
40.fi
41.br
42.ti +2
···78.sp
79\f[CB]type\fR x = \.\.
80.sp
81+\f[CB]type\fR Labels\.x +=
82.br
83.ti +2
84| \f[CB]X\fR
···89Attached to extension
90.nf
91.sp
92+\f[CB]module\fR S := Labels\.A
93.fi
94.br
95.ti +2
96Attached to module subst
97.nf
98.sp
99+\f[CB]type\fR s := Labels\.t
100.fi
101.br
102.ti +2
···115\f[CB]type\fR v = {
116.br
117.ti +2
118+f : Labels\.t;
119.br
120.ti +4
121(* Attached to field *)
···45.br
46\f[CB]end\fR
47.sp
48-\f[CB]module\fR \f[CB]type\fR D = A
49.sp
50\f[CB]module\fR \f[CB]type\fR E = \f[CB]sig\fR
51.br
···104.br
105\f[CB]end\fR
106.sp
107-\f[CB]module\fR \f[CB]type\fR I = B
···45.br
46\f[CB]end\fR
47.sp
48+\f[CB]module\fR \f[CB]type\fR D = Module_type_alias\.A
49.sp
50\f[CB]module\fR \f[CB]type\fR E = \f[CB]sig\fR
51.br
···104.br
105\f[CB]end\fR
106.sp
107+\f[CB]module\fR \f[CB]type\fR I = Module_type_alias\.B
+1-1
odoc/test/generators/man/Module_type_of.3o
···44.sp
45\f[CB]module\fR X : \f[CB]sig\fR \.\.\. \f[CB]end\fR
46.sp
47-\f[CB]module\fR T : S \f[CB]with\fR \f[CB]module\fR M = X
···44.sp
45\f[CB]module\fR X : \f[CB]sig\fR \.\.\. \f[CB]end\fR
46.sp
47+\f[CB]module\fR T : Module_type_of\.S \f[CB]with\fR \f[CB]module\fR M = Module_type_of\.X
+1-1
odoc/test/generators/man/Module_type_of.T.3o
···18.br
19\f[CB]end\fR
20.sp
21-\f[CB]module\fR M = X
22.sp
23\f[CB]module\fR N : \f[CB]module\fR \f[CB]type\fR \f[CB]of\fR \f[CB]struct\fR \f[CB]include\fR M \f[CB]end\fR
···18.br
19\f[CB]end\fR
20.sp
21+\f[CB]module\fR M = Module_type_of\.X
22.sp
23\f[CB]module\fR N : \f[CB]module\fR \f[CB]type\fR \f[CB]of\fR \f[CB]struct\fR \f[CB]include\fR M \f[CB]end\fR
···16\f[CB]module\fR \f[CB]type\fR local = \f[CB]sig\fR
17.br
18.ti +2
19-\f[CB]type\fR t = local
20.br
21\f[CB]end\fR
22.sp
23-\f[CB]module\fR \f[CB]type\fR w = local
24.sp
25\f[CB]module\fR \f[CB]type\fR s = \f[CB]sig\fR \f[CB]end\fR
···16\f[CB]module\fR \f[CB]type\fR local = \f[CB]sig\fR
17.br
18.ti +2
19+\f[CB]type\fR t = Module_type_subst\.Local\.local
20.br
21\f[CB]end\fR
22.sp
23+\f[CB]module\fR \f[CB]type\fR w = Module_type_subst\.Local\.local
24.sp
25\f[CB]module\fR \f[CB]type\fR s = \f[CB]sig\fR \f[CB]end\fR
···13.nf
14\f[CB]type\fR 'a t
15.sp
16-\f[CB]val\fR id : \f[CB]'a\fR t \f[CB]\->\fR \f[CB]'a\fR t
00
···13.nf
14\f[CB]type\fR 'a t
15.sp
16+\f[CB]val\fR id :
17+ \f[CB]'a\fR Ocamlary\.CanonicalTest\.Base\.List\.t \f[CB]\->\fR
18+ \f[CB]'a\fR Ocamlary\.CanonicalTest\.Base\.List\.t
···13.nf
14\f[CB]type\fR 'a t
15.sp
16-\f[CB]val\fR id : \f[CB]'a\fR t \f[CB]\->\fR \f[CB]'a\fR t
00
···13.nf
14\f[CB]type\fR 'a t
15.sp
16+\f[CB]val\fR id :
17+ \f[CB]'a\fR Ocamlary\.CanonicalTest\.Base_Tests\.C\.t \f[CB]\->\fR
18+ \f[CB]'a\fR Ocamlary\.CanonicalTest\.Base_Tests\.C\.t
···11.SH Documentation
12.sp
13.nf
14-\f[CB]type\fR 'c t = \f[CB]'c\fR Base\.List\.t
15.sp
16-\f[CB]val\fR id : \f[CB]'a\fR t \f[CB]\->\fR \f[CB]'a\fR t
00
···11.SH Documentation
12.sp
13.nf
14-\f[CB]module\fR Y : S
···11.SH Documentation
12.sp
13.nf
14+\f[CB]module\fR Y : Ocamlary\.Dep1\.S
+1-1
odoc/test/generators/man/Ocamlary.Dep2.3o
···25\f[CB]module\fR X : \f[CB]sig\fR
26.br
27.ti +4
28-\f[CB]module\fR Y : S
29.br
30.ti +2
31\f[CB]end\fR
···25\f[CB]module\fR X : \f[CB]sig\fR
26.br
27.ti +4
28+\f[CB]module\fR Y : Arg\.S
29.br
30.ti +2
31\f[CB]end\fR
+1-1
odoc/test/generators/man/Ocamlary.Dep4.3o
···34.br
35\f[CB]end\fR
36.sp
37-\f[CB]module\fR X : T
···34.br
35\f[CB]end\fR
36.sp
37+\f[CB]module\fR X : Ocamlary\.Dep4\.T
+3-3
odoc/test/generators/man/Ocamlary.Dep5.3o
···25\f[CB]module\fR \f[CB]type\fR S = \f[CB]sig\fR
26.br
27.ti +4
28-\f[CB]module\fR X : T
29.sp
30.ti +4
31\f[CB]module\fR Y : \f[CB]sig\fR \f[CB]end\fR
···34\f[CB]end\fR
35.sp
36.ti +2
37-\f[CB]module\fR X : T
38.br
39\f[CB]end\fR
40.sp
···42\fB2 Signature\fR
43.in
44.sp
45-\f[CB]module\fR Z : Arg\.S \f[CB]with\fR \f[CB]module\fR Y = Dep3
···25\f[CB]module\fR \f[CB]type\fR S = \f[CB]sig\fR
26.br
27.ti +4
28+\f[CB]module\fR X : Arg\.T
29.sp
30.ti +4
31\f[CB]module\fR Y : \f[CB]sig\fR \f[CB]end\fR
···34\f[CB]end\fR
35.sp
36.ti +2
37+\f[CB]module\fR X : Arg\.T
38.br
39\f[CB]end\fR
40.sp
···42\fB2 Signature\fR
43.in
44.sp
45+\f[CB]module\fR Z : Arg\.S \f[CB]with\fR \f[CB]module\fR Y = Ocamlary\.Dep3
+1-1
odoc/test/generators/man/Ocamlary.Dep5.Z.3o
···13.nf
14\f[CB]module\fR X : Arg\.T
15.sp
16-\f[CB]module\fR Y = Dep3
···13.nf
14\f[CB]module\fR X : Arg\.T
15.sp
16+\f[CB]module\fR Y = Ocamlary\.Dep3
+2-2
odoc/test/generators/man/Ocamlary.Dep6.3o
···21\f[CB]module\fR \f[CB]type\fR T = \f[CB]sig\fR
22.br
23.ti +2
24-\f[CB]module\fR \f[CB]type\fR R = S
25.sp
26.ti +2
27\f[CB]module\fR Y : \f[CB]sig\fR
···34.br
35\f[CB]end\fR
36.sp
37-\f[CB]module\fR X : T
···21\f[CB]module\fR \f[CB]type\fR T = \f[CB]sig\fR
22.br
23.ti +2
24+\f[CB]module\fR \f[CB]type\fR R = Ocamlary\.Dep6\.S
25.sp
26.ti +2
27\f[CB]module\fR Y : \f[CB]sig\fR
···34.br
35\f[CB]end\fR
36.sp
37+\f[CB]module\fR X : Ocamlary\.Dep6\.T
+2-2
odoc/test/generators/man/Ocamlary.Dep6.X.3o
···11.SH Documentation
12.sp
13.nf
14-\f[CB]module\fR \f[CB]type\fR R = S
15.sp
16-\f[CB]module\fR Y : R
···11.SH Documentation
12.sp
13.nf
14+\f[CB]module\fR \f[CB]type\fR R = Ocamlary\.Dep6\.S
15.sp
16+\f[CB]module\fR Y : Ocamlary\.Dep6\.X\.R
+3-3
odoc/test/generators/man/Ocamlary.Dep7.3o
···25\f[CB]module\fR \f[CB]type\fR T = \f[CB]sig\fR
26.br
27.ti +4
28-\f[CB]module\fR \f[CB]type\fR R = S
29.sp
30.ti +4
31\f[CB]module\fR Y : R
···37\f[CB]module\fR X : \f[CB]sig\fR
38.br
39.ti +4
40-\f[CB]module\fR \f[CB]type\fR R = S
41.sp
42.ti +4
43-\f[CB]module\fR Y : R
44.br
45.ti +2
46\f[CB]end\fR
···25\f[CB]module\fR \f[CB]type\fR T = \f[CB]sig\fR
26.br
27.ti +4
28+\f[CB]module\fR \f[CB]type\fR R = Arg\.S
29.sp
30.ti +4
31\f[CB]module\fR Y : R
···37\f[CB]module\fR X : \f[CB]sig\fR
38.br
39.ti +4
40+\f[CB]module\fR \f[CB]type\fR R = Arg\.S
41.sp
42.ti +4
43+\f[CB]module\fR Y : Arg\.X\.R
44.br
45.ti +2
46\f[CB]end\fR
+1-1
odoc/test/generators/man/Ocamlary.Dep7.M.3o
···13.nf
14\f[CB]module\fR \f[CB]type\fR R = Arg\.S
15.sp
16-\f[CB]module\fR Y : R
···13.nf
14\f[CB]module\fR \f[CB]type\fR R = Arg\.S
15.sp
16+\f[CB]module\fR Y : M\.R
+1-1
odoc/test/generators/man/Ocamlary.ExtMod.3o
···13.nf
14\f[CB]type\fR t = \.\.
15.sp
16-\f[CB]type\fR t +=
17.br
18.ti +2
19| \f[CB]Leisureforce\fR
···11.SH Documentation
12.sp
13.nf
14-\f[CB]module\fR M = With2
15.sp
16\f[CB]module\fR N : M\.S
···11.SH Documentation
12.sp
13.nf
14+\f[CB]module\fR M = Ocamlary\.With2
15.sp
16\f[CB]module\fR N : M\.S
+1-1
odoc/test/generators/man/Ocamlary.With4.3o
···11.SH Documentation
12.sp
13.nf
14-\f[CB]module\fR N : With2\.S
···11.SH Documentation
12.sp
13.nf
14+\f[CB]module\fR N : Ocamlary\.With2\.S
+1-1
odoc/test/generators/man/Ocamlary.With5.3o
···18.br
19\f[CB]end\fR
20.sp
21-\f[CB]module\fR N : S
···18.br
19\f[CB]end\fR
20.sp
21+\f[CB]module\fR N : Ocamlary\.With5\.S
+1-1
odoc/test/generators/man/Ocamlary.With6.3o
···20\f[CB]module\fR \f[CB]type\fR S
21.sp
22.ti +4
23-\f[CB]module\fR N : S
24.br
25.ti +2
26\f[CB]end\fR
···20\f[CB]module\fR \f[CB]type\fR S
21.sp
22.ti +4
23+\f[CB]module\fR N : M\.S
24.br
25.ti +2
26\f[CB]end\fR
+5-5
odoc/test/generators/man/Recent.3o
···64\f[CB]type\fR _ gadt =
65.br
66.ti +2
67-| \f[CB]A\fR : int gadt
68.br
69.ti +2
70-| \f[CB]B\fR : int \f[CB]\->\fR string gadt
71.br
72.ti +4
73(* foo *)
···79a : int;
80.br
81.ti +4
82-} \f[CB]\->\fR unit gadt
83.br
84.sp
85\f[CB]type\fR polymorphic_variant = [
···111\f[CB]type\fR empty_conj =
112.br
113.ti +2
114-| \f[CB]X\fR : [< `X of & \f[CB]'a\fR & int * float ] \f[CB]\->\fR empty_conj
115.br
116.sp
117\f[CB]type\fR conj =
118.br
119.ti +2
120-| \f[CB]X\fR : [< `X of int & [< `B of int & float ] ] \f[CB]\->\fR conj
121.br
122.sp
123\f[CB]val\fR empty_conj : [< `X of & \f[CB]'a\fR & int * float ]
···64\f[CB]type\fR _ gadt =
65.br
66.ti +2
67+| \f[CB]A\fR : int Recent\.gadt
68.br
69.ti +2
70+| \f[CB]B\fR : int \f[CB]\->\fR string Recent\.gadt
71.br
72.ti +4
73(* foo *)
···79a : int;
80.br
81.ti +4
82+} \f[CB]\->\fR unit Recent\.gadt
83.br
84.sp
85\f[CB]type\fR polymorphic_variant = [
···111\f[CB]type\fR empty_conj =
112.br
113.ti +2
114+| \f[CB]X\fR : [< `X of & \f[CB]'a\fR & int * float ] \f[CB]\->\fR Recent\.empty_conj
115.br
116.sp
117\f[CB]type\fR conj =
118.br
119.ti +2
120+| \f[CB]X\fR : [< `X of int & [< `B of int & float ] ] \f[CB]\->\fR Recent\.conj
121.br
122.sp
123\f[CB]val\fR empty_conj : [< `X of & \f[CB]'a\fR & int * float ]
+2-2
odoc/test/generators/man/Recent.X.3o
···11.SH Documentation
12.sp
13.nf
14-\f[CB]module\fR L := Z\.Y
15.sp
16\f[CB]type\fR t = int L\.X\.t
17.sp
18\f[CB]type\fR u := int
19.sp
20-\f[CB]type\fR v = u L\.X\.t
···11.SH Documentation
12.sp
13.nf
14+\f[CB]module\fR L := Recent\.Z\.Y
15.sp
16\f[CB]type\fR t = int L\.X\.t
17.sp
18\f[CB]type\fR u := int
19.sp
20+\f[CB]type\fR v = Recent\.X\.u L\.X\.t
+1-1
odoc/test/generators/man/Recent_impl.3o
···47.br
48\f[CB]end\fR
49.sp
50-\f[CB]module\fR B' = Foo\.B
···47.br
48\f[CB]end\fR
49.sp
50+\f[CB]module\fR B' = Recent_impl\.Foo\.B
···5module type S = sig ... end
6```
7```
8-module type S1 = functor (_ : S) -> S
9```
10```
11-module F1 (Arg : S) : S
12```
13```
14-module F2 (Arg : S) : S with type t = Arg.t
15```
16```
17-module F3 (Arg : S) : sig ... end
18```
19```
20-module F4 (Arg : S) : S
21```
22```
23-module F5 () : S
24```
···5module type S = sig ... end
6```
7```
8+module type S1 = functor (_ : Functor.S) -> Functor.S
9```
10```
11+module F1 (Arg : Functor.S) : Functor.S
12```
13```
14+module F2 (Arg : Functor.S) : Functor.S with type t = Arg.t
15```
16```
17+module F3 (Arg : Functor.S) : sig ... end
18```
19```
20+module F4 (Arg : Functor.S) : Functor.S
21```
22```
23+module F5 () : Functor.S
24```
+2-2
odoc/test/generators/markdown/Functor2-X.md
···5## Parameters
67```
8-module Y : S
9```
10```
11-module Z : S
12```
1314## Signature
···5## Parameters
67```
8+module Y : Functor2.S
9```
10```
11+module Z : Functor2.S
12```
1314## Signature
···5## Parameters
67```
8-module Y : S
9```
10```
11-module Z : S
12```
1314## Signature
···5## Parameters
67```
8+module Y : Functor2.S
9```
10```
11+module Z : Functor2.S
12```
1314## Signature
+5-2
odoc/test/generators/markdown/Functor2.md
···5module type S = sig ... end
6```
7```
8-module X (Y : S) (Z : S) : sig ... end
9```
10```
11-module type XF = functor (Y : S) -> functor (Z : S) -> sig ... end
00012```
···5module type S = sig ... end
6```
7```
8+module X (Y : Functor2.S) (Z : Functor2.S) : sig ... end
9```
10```
11+module type XF =
12+ functor (Y : Functor2.S) ->
13+ functor (Z : Functor2.S) ->
14+ sig ... end
15```
···4The `include Y` below should have the synopsis from `Y`'s top-comment attached to it.
56```
7-type t = Y.t
8```
···4The `include Y` below should have the synopsis from `Y`'s top-comment attached to it.
56```
7+type t = Include2.Y.t
8```
+8-22
odoc/test/generators/markdown/Labels.md
···16Attached to type
1718```
19-val f : t
20```
21Attached to value
2223```
24-val e : unit -> t
25```
26Attached to external
27···43type x = ..
44```
45```
46-type x +=
47-```
48-```
49| X
50-```
51-```
5253```
54Attached to extension
5556```
57-module S := A
58```
59Attached to module subst
6061```
62-type s := t
63```
64Attached to type subst
6566```
67-type u =
68-```
69-```
70-| A'
71-```
72-Attached to constructor
73-74-```
7576```
77```
78type v = {
79-```
80-`f : t;`
81-Attached to field
82-83-```
84}
85```
86Testing that labels can be referenced
···16Attached to type
1718```
19+val f : Labels.t
20```
21Attached to value
2223```
24+val e : unit -> Labels.t
25```
26Attached to external
27···43type x = ..
44```
45```
46+type Labels.x +=
0047| X
004849```
50Attached to extension
5152```
53+module S := Labels.A
54```
55Attached to module subst
5657```
58+type s := Labels.t
59```
60Attached to type subst
6162```
63+type u =
64+| A' (** Attached to constructor *)
0000006566```
67```
68type v = {
69+ (** Attached to field *)
000070}
71```
72Testing that labels can be referenced
···14type ('a, 'b) w
15```
16```
17-module M = M'
18```
···14type ('a, 'b) w
15```
16```
17+module M = Module.M'
18```
+8-8
odoc/test/generators/markdown/Module.md
···15module type S1
16```
17```
18-module type S2 = S
19```
20```
21-module type S3 = S with type t = int and type u = string
22```
23```
24-module type S4 = S with type t := int
25```
26```
27-module type S5 = S with type 'a v := 'a list
28```
29```
30type ('a, 'b) result
31```
32```
33-module type S6 = S with type ('a, 'b) w := ('a, 'b) result
34```
35```
36module M' : sig ... end
37```
38```
39-module type S7 = S with module M = M'
40```
41```
42-module type S8 = S with module M := M'
43```
44```
45-module type S9 = module type of M'
46```
47```
48module Mutually : sig ... end
···15module type S1
16```
17```
18+module type S2 = Module.S
19```
20```
21+module type S3 = Module.S with type t = int and type u = string
22```
23```
24+module type S4 = Module.S with type t := int
25```
26```
27+module type S5 = Module.S with type 'a v := 'a list
28```
29```
30type ('a, 'b) result
31```
32```
33+module type S6 = Module.S with type ('a, 'b) w := ('a, 'b) Module.result
34```
35```
36module M' : sig ... end
37```
38```
39+module type S7 = Module.S with module M = Module.M'
40```
41```
42+module type S8 = Module.S with module M := Module.M'
43```
44```
45+module type S9 = module type of Module.M'
46```
47```
48module Mutually : sig ... end
···10module type B = functor (C : sig ... end) -> sig ... end
11```
12```
13-module type D = A
14```
15```
16-module type E = functor (F : sig ... end) -> B
17```
18```
19-module type G = functor (H : sig ... end) -> D
20```
21```
22-module type I = B
23```
···10module type B = functor (C : sig ... end) -> sig ... end
11```
12```
13+module type D = Module_type_alias.A
14```
15```
16+module type E = functor (F : sig ... end) -> Module_type_alias.B
17```
18```
19+module type G = functor (H : sig ... end) -> Module_type_alias.D
20```
21```
22+module type I = Module_type_alias.B
23```
+1-1
odoc/test/generators/markdown/Module_type_of-T.md
···5module type T = sig ... end
6```
7```
8-module M = X
9```
10```
11module N : module type of struct include M end
···5module type T = sig ... end
6```
7```
8+module M = Module_type_of.X
9```
10```
11module N : module type of struct include M end
+1-1
odoc/test/generators/markdown/Module_type_of.md
···8module X : sig ... end
9```
10```
11-module T : S with module M = X
12```
···8module X : sig ... end
9```
10```
11+module T : Module_type_of.S with module M = Module_type_of.X
12```
···5module type u = sig ... end
6```
7```
8-module type with_ = u with module type T = s
09```
10```
11module type u2 = sig ... end
12```
13```
14-module type with_2 = u2 with module type T = sig ... end
015```
16```
17module type a = sig ... end
18```
19```
20-module type c = a with module type b := s
021```
···5module type u = sig ... end
6```
7```
8+module type with_ =
9+ Module_type_subst.Basic.u with module type T = Module_type_subst.s
10```
11```
12module type u2 = sig ... end
13```
14```
15+module type with_2 =
16+ Module_type_subst.Basic.u2 with module type T = sig ... end
17```
18```
19module type a = sig ... end
20```
21```
22+module type c =
23+ Module_type_subst.Basic.a with module type b := Module_type_subst.s
24```
···5module type nested = sig ... end
6```
7```
8-module type with_ = nested with module type N.t = s
09```
10```
11-module type with_subst = nested with module type N.t := s
012```
···5module type nested = sig ... end
6```
7```
8+module type with_ =
9+ Module_type_subst.Nested.nested with module type N.t = Module_type_subst.s
10```
11```
12+module type with_subst =
13+ Module_type_subst.Nested.nested with module type N.t := Module_type_subst.s
14```
···2# Module `CanonicalTest.Base_Tests`
34```
5-module C : module type of Base.List
6```
7```
8-module L = Base.List
9```
10```
11val foo : int L.t -> float L.t
12```
13```
14-val bar : 'a Base.List.t -> 'a Base.List.t
0015```
16```
17-val baz : 'a Base.List.t -> unit
18```
···2# Module `CanonicalTest.Base_Tests`
34```
5+module C : module type of Ocamlary.CanonicalTest.Base.List
6```
7```
8+module L = Ocamlary.CanonicalTest.Base.List
9```
10```
11val foo : int L.t -> float L.t
12```
13```
14+val bar :
15+ 'a Ocamlary.CanonicalTest.Base.List.t ->
16+ 'a Ocamlary.CanonicalTest.Base.List.t
17```
18```
19+val baz : 'a Ocamlary.CanonicalTest.Base.List.t -> unit
20```
···8module Base_Tests : sig ... end
9```
10```
11-module List_modif : module type of Base.List with type 'c t = 'c Base.List.t
0012```
···8module Base_Tests : sig ... end
9```
10```
11+module List_modif :
12+ module type of Base.List
13+ with type 'c t = 'c Ocamlary.CanonicalTest.Base.List.t
14```
···17This comment is for `InnerModuleA`.
1819```
20-module type InnerModuleTypeA = InnerModuleA.InnerModuleTypeA'
021```
22This comment is for `InnerModuleTypeA`.
···17This comment is for `InnerModuleA`.
1819```
20+module type InnerModuleTypeA =
21+ Ocamlary.CollectionModule.InnerModuleA.InnerModuleTypeA'
22```
23This comment is for `InnerModuleTypeA`.
···17This comment is for `InnerModuleA`.
1819```
20-module type InnerModuleTypeA = InnerModuleA.InnerModuleTypeA'
21```
22This comment is for `InnerModuleTypeA`.
···17This comment is for `InnerModuleA`.
1819```
20+module type InnerModuleTypeA = Collection.InnerModuleA.InnerModuleTypeA'
21```
22This comment is for `InnerModuleTypeA`.
···17This comment is for `InnerModuleA`.
1819```
20-module type InnerModuleTypeA = InnerModuleA.InnerModuleTypeA'
21```
22This comment is for `InnerModuleTypeA`.
···17This comment is for `InnerModuleA`.
1819```
20+module type InnerModuleTypeA = C.InnerModuleA.InnerModuleTypeA'
21```
22This comment is for `InnerModuleTypeA`.
···17This comment is for `InnerModuleA`.
1819```
20-module type InnerModuleTypeA = InnerModuleA.InnerModuleTypeA'
21```
22This comment is for `InnerModuleTypeA`.
···17This comment is for `InnerModuleA`.
1819```
20+module type InnerModuleTypeA = Q.InnerModuleA.InnerModuleTypeA'
21```
22This comment is for `InnerModuleTypeA`.
···17This comment is for `InnerModuleA`.
1819```
20-module type InnerModuleTypeA = InnerModuleA.InnerModuleTypeA'
21```
22This comment is for `InnerModuleTypeA`.
···17This comment is for `InnerModuleA`.
1819```
20+module type InnerModuleTypeA = Q.InnerModuleA.InnerModuleTypeA'
21```
22This comment is for `InnerModuleTypeA`.
···17This comment is for `InnerModuleA`.
1819```
20-module type InnerModuleTypeA = InnerModuleA.InnerModuleTypeA'
21```
22This comment is for `InnerModuleTypeA`.
···17This comment is for `InnerModuleA`.
1819```
20+module type InnerModuleTypeA = Q.InnerModuleA.InnerModuleTypeA'
21```
22This comment is for `InnerModuleTypeA`.
···17This comment is for `InnerModuleA`.
1819```
20-module type InnerModuleTypeA = InnerModuleA.InnerModuleTypeA'
21```
22This comment is for `InnerModuleTypeA`.
···17This comment is for `InnerModuleA`.
1819```
20+module type InnerModuleTypeA = C.InnerModuleA.InnerModuleTypeA'
21```
22This comment is for `InnerModuleTypeA`.
···2# Module type `Ocamlary.RecollectionModule`
34```
5-type collection = CollectionModule.element list
6```
7```
8-type element = CollectionModule.collection
9```
10```
11module InnerModuleA : sig ... end
···2# Module type `Ocamlary.RecollectionModule`
34```
5+type collection = Ocamlary.CollectionModule.element list
6```
7```
8+type element = Ocamlary.CollectionModule.collection
9```
10```
11module InnerModuleA : sig ... end
···2# Module `With8.M`
34```
5-module type S = With5.S
6```
7```
8-module N : module type of struct include With5.N end with type t = With5.N.t
009```
···2# Module `With8.M`
34```
5+module type S = Ocamlary.With5.S
6```
7```
8+module N :
9+ module type of struct include Ocamlary.With5.N end
10+ with type t = Ocamlary.With5.N.t
11```
···2# Module type `Ocamlary.With8`
34```
5-module M : module type of struct include With5 end with type N.t = With5.N.t
006```
···2# Module type `Ocamlary.With8`
34```
5+module M :
6+ module type of struct include Ocamlary.With5 end
7+ with type N.t = Ocamlary.With5.N.t
8```
+102-272
odoc/test/generators/markdown/Ocamlary.md
···86## Section 9000
8788```
89-module EmptyAlias = Empty
90```
91A plain module alias of `Empty`
92···99A plain, empty module signature
100101```
102-module type EmptySigAlias = EmptySig
103```
104A plain, empty module signature alias of
105106```
107-module ModuleWithSignature : EmptySig
108```
109A plain module of a signature of [`EmptySig`](./Ocamlary-module-type-EmptySig.md) (reference)
110111```
112-module ModuleWithSignatureAlias : EmptySigAlias
113```
114A plain module with an alias signature
115···179parameter x the x coordinate
180returns the y coordinate
181```
182-val fun_fun_fun : ((int, int) a_function, (unit, unit) a_function) a_function
00183```
184```
185val fun_maybe : ?yes:unit -> unit -> int
···272This comment is for `CollectionModule`.
273274```
275-module type COLLECTION = module type of CollectionModule
276```
277module type of
278279```
280module Recollection
281- (C : COLLECTION) :
282- COLLECTION
283 with type collection = C.element list
284 and type element = C.collection
285```
···289module type MMM = sig ... end
290```
291```
292-module type RECOLLECTION = MMM with module C = Recollection(CollectionModule)
0293```
294```
295module type RecollectionModule = sig ... end
···307308```
309module FunctorTypeOf
310- (Collection : module type of CollectionModule) :
311 sig ... end
312```
313This comment is for `FunctorTypeOf`.
···331332```
333type record = {
334-```
335-`field1 : int;`
336-This comment is for `field1`.
337-338-`field2 : int;`
339-This comment is for `field2`.
340-341-```
342}
343```
344This comment is for `record`.
···347348```
349type mutable_record = {
350-```
351-`mutable a : int;`
352-`a` is first and mutable
353-354-`b : unit;`
355-`b` is second and immutable
356-357-`mutable c : int;`
358-`c` is third and mutable
359-360-```
361}
362```
363```
364type universe_record = {
365-```
366-`nihilate : 'a. 'a -> unit;`
367-```
368-}
369-```
370-```
371-type variant =
372-```
373-```
374-| TagA
375-```
376-This comment is for `TagA`.
3770378```
379-| ConstrB of int
380```
381-This comment is for `ConstrB`.
382-383-```
384-| ConstrC of int * int
385-```
386-This comment is for binary `ConstrC`.
387-388-```
389-| ConstrD of int * int
390-```
391-This comment is for unary `ConstrD` of binary tuple.
392-393-```
394395```
396This comment is for `variant`.
···398This comment is also for `variant`.
399400```
401-type poly_variant = [
402-```
403-```
404| `TagA
405-```
406-```
407| `ConstrB of int
408-```
409-```
410- ]
411```
412This comment is for `poly_variant`.
413414Wow\! It was a polymorphic variant\!
415416```
417-type (_, _) full_gadt =
418-```
419-```
420-| Tag : (unit, unit) full_gadt
421-```
422-```
423-| First : 'a -> ('a, unit) full_gadt
424-```
425-```
426-| Second : 'a -> (unit, 'a) full_gadt
427-```
428-```
429-| Exist : 'a * 'b -> ('b, unit) full_gadt
430-```
431-```
432433```
434This comment is for `full_gadt`.
···436Wow\! It was a GADT\!
437438```
439-type 'a partial_gadt =
440-```
441-```
442-| AscribeTag : 'a partial_gadt
443-```
444-```
445-| OfTag of 'a partial_gadt
446-```
447-```
448-| ExistGadtTag : ('a -> 'b) -> 'a partial_gadt
449-```
450-```
451452```
453This comment is for `partial_gadt`.
···455Wow\! It was a mixed GADT\!
456457```
458-type alias = variant
459```
460This comment is for `alias`.
461462```
463-type tuple = (alias * alias) * alias * (alias * alias)
000464```
465This comment is for `tuple`.
466467```
468-type variant_alias = variant =
469-```
470-```
471| TagA
472-```
473-```
474| ConstrB of int
475-```
476-```
477| ConstrC of int * int
478-```
479-```
480| ConstrD of int * int
481-```
482-```
483484```
485This comment is for `variant_alias`.
486487```
488-type record_alias = record = {
489-```
490-`field1 : int;`
491-`field2 : int;`
492-```
493}
494```
495This comment is for `record_alias`.
496497```
498-type poly_variant_union = [
499-```
500-```
501-| poly_variant
502-```
503-```
504| `TagC
505-```
506-```
507- ]
508```
509This comment is for `poly_variant_union`.
510511```
512-type 'a poly_poly_variant = [
513-```
514-```
515| `TagA of 'a
516-```
517-```
518- ]
519-```
520-```
521-type ('a, 'b) bin_poly_poly_variant = [
522```
523```
0524| `TagA of 'a
525-```
526-```
527| `ConstrB of 'b
528-```
529-```
530- ]
531```
532```
533type 'a open_poly_variant = [> `TagA ] as 'a
···536type 'a open_poly_variant2 = [> `ConstrB of int ] as 'a
537```
538```
539-type 'a open_poly_variant_alias = 'a open_poly_variant open_poly_variant2
0540```
541```
542type 'a poly_fun = ([> `ConstrB of int ] as 'a) -> 'a
···551type 'a clopen_poly_variant = [< `One | `Two of int | `Three Two Three ] as 'a
552```
553```
554-type nested_poly_variant = [
555-```
556-```
557| `A
558-```
559-```
560| `B of [ `B1 | `B2 ]
561-```
562-```
563| `C
564-```
565-```
566| `D of [ `D1 of [ `D1a ] ]
567-```
568-```
569- ]
570-```
571-```
572-type ('a, 'b) full_gadt_alias = ('a, 'b) full_gadt =
573-```
574-```
575-| Tag : (unit, unit) full_gadt_alias
576```
577```
578-| First : 'a -> ('a, unit) full_gadt_alias
579-```
580-```
581-| Second : 'a -> (unit, 'a) full_gadt_alias
582-```
583-```
584-| Exist : 'a * 'b -> ('b, unit) full_gadt_alias
585-```
586-```
587588```
589This comment is for `full_gadt_alias`.
590591```
592-type 'a partial_gadt_alias = 'a partial_gadt =
593-```
594-```
595-| AscribeTag : 'a partial_gadt_alias
596-```
597-```
598-| OfTag of 'a partial_gadt_alias
599-```
600-```
601-| ExistGadtTag : ('a -> 'b) -> 'a partial_gadt_alias
602-```
603-```
604605```
606This comment is for `partial_gadt_alias`.
···611This comment is for [`Exn_arrow`](./#exception-Exn_arrow).
612613```
614-type mutual_constr_a =
615-```
616-```
617| A
618-```
619-```
620-| B_ish of mutual_constr_b
621-```
622-This comment is between [`mutual_constr_a`](./#type-mutual_constr_a) and [`mutual_constr_b`](./#type-mutual_constr_b).
623-624-```
625626```
627This comment is for [`mutual_constr_a`](./#type-mutual_constr_a) then [`mutual_constr_b`](./#type-mutual_constr_b).
628629```
630-and mutual_constr_b =
631-```
632-```
633| B
634-```
635-```
636-| A_ish of mutual_constr_a
637-```
638-This comment must be here for the next to associate correctly.
639-640-```
641642```
643This comment is for [`mutual_constr_b`](./#type-mutual_constr_b) then [`mutual_constr_a`](./#type-mutual_constr_a).
644645```
646-type rec_obj = < f : int ; g : unit -> unit ; h : rec_obj >
647```
648```
649type 'a open_obj = < f : int ; g : unit -> unit.. > as 'a
···666A mystery wrapped in an ellipsis
667668```
669-type ext +=
670-```
671-```
672| ExtA
673-```
674-```
675676```
677```
678-type ext +=
679-```
680-```
681| ExtB
682-```
683-```
684685```
686```
687-type ext +=
688-```
689-```
690| ExtC of unit
691-```
692-```
693-| ExtD of ext
694-```
695-```
696697```
698```
699-type ext +=
700-```
701-```
702| ExtE
703-```
704-```
705706```
707```
708-type ext += private
709-```
710-```
711| ExtF
712-```
713-```
714715```
716```
···719'a poly\_ext
720721```
722-type poly_ext +=
723-```
724-```
725| Foo of 'b
726-```
727-```
728-| Bar of 'b * 'b
729-```
730-'b poly\_ext
731732```
733-734```
735-```
736-type poly_ext +=
737-```
738-```
739-| Quux of 'c
740-```
741-'c poly\_ext
742-743-```
744745```
746```
747module ExtMod : sig ... end
748```
749```
750-type ExtMod.t +=
751-```
752-```
753-| ZzzTop0
754-```
755-It's got the rock
756757```
758-759```
760-```
761-type ExtMod.t +=
762-```
763-```
764-| ZzzTop of unit
765-```
766-and it packs a unit.
767-768-```
769770```
771```
···774Rotate keys on my mark...
775776```
777-type my_mod = (module COLLECTION)
778```
779A brown paper package tied up with string
780···815module Dep5 (Arg : sig ... end) : sig ... end
816```
817```
818-type dep2 = Dep5(Dep4).Z.X.b
819```
820```
821type dep3 = Dep5(Dep4).Z.Y.a
···827module Dep7 (Arg : sig ... end) : sig ... end
828```
829```
830-type dep4 = Dep7(Dep6).M.Y.d
831```
832```
833module Dep8 : sig ... end
···836module Dep9 (X : sig ... end) : sig ... end
837```
838```
839-module type Dep10 = Dep9(Dep8).T with type t = int
840```
841```
842module Dep11 : sig ... end
···845module Dep12 (Arg : sig ... end) : sig ... end
846```
847```
848-module Dep13 : Dep12(Dep11).T
849```
850```
851-type dep5 = Dep13.c
852```
853```
854module type With1 = sig ... end
···857module With2 : sig ... end
858```
859```
860-module With3 : With1 with module M = With2
861```
862```
863-type with1 = With3.N.t
864```
865```
866-module With4 : With1 with module M := With2
867```
868```
869-type with2 = With4.N.t
870```
871```
872module With5 : sig ... end
···879```
880```
881module type With8 =
882- With7(With6).T with module M = With5 and type M.N.t = With5.N.t
00883```
884```
885module With9 : sig ... end
···888module With10 : sig ... end
889```
890```
891-module type With11 = With7(With10).T with module M = With9 and type N.t = int
000892```
893```
894module type NestedInclude1 = sig ... end
···995type new_t = ..
996```
997```
998-type new_t +=
999-```
1000-```
1001| C
1002-```
1003-```
10041005```
1006```
1007-module type TypeExtPruned = TypeExt with type t := new_t
1008```
1009```
1010module Op : sig ... end
···86## Section 9000
8788```
89+module EmptyAlias = Ocamlary.Empty
90```
91A plain module alias of `Empty`
92···99A plain, empty module signature
100101```
102+module type EmptySigAlias = Ocamlary.EmptySig
103```
104A plain, empty module signature alias of
105106```
107+module ModuleWithSignature : Ocamlary.EmptySig
108```
109A plain module of a signature of [`EmptySig`](./Ocamlary-module-type-EmptySig.md) (reference)
110111```
112+module ModuleWithSignatureAlias : Ocamlary.EmptySigAlias
113```
114A plain module with an alias signature
115···179parameter x the x coordinate
180returns the y coordinate
181```
182+val fun_fun_fun :
183+ ((int, int) Ocamlary.a_function, (unit, unit) Ocamlary.a_function)
184+ Ocamlary.a_function
185```
186```
187val fun_maybe : ?yes:unit -> unit -> int
···274This comment is for `CollectionModule`.
275276```
277+module type COLLECTION = module type of Ocamlary.CollectionModule
278```
279module type of
280281```
282module Recollection
283+ (C : Ocamlary.COLLECTION) :
284+ Ocamlary.COLLECTION
285 with type collection = C.element list
286 and type element = C.collection
287```
···291module type MMM = sig ... end
292```
293```
294+module type RECOLLECTION =
295+ Ocamlary.MMM with module C = Ocamlary.Recollection(Ocamlary.CollectionModule)
296```
297```
298module type RecollectionModule = sig ... end
···310311```
312module FunctorTypeOf
313+ (Collection : module type of Ocamlary.CollectionModule) :
314 sig ... end
315```
316This comment is for `FunctorTypeOf`.
···334335```
336type record = {
337+ (** This comment is for field1. *)
338+ (** This comment is for field2. *)
000000339}
340```
341This comment is for `record`.
···344345```
346type mutable_record = {
347+ (** a is first and mutable *)
348+ (** b is second and immutable *)
349+ (** c is third and mutable *)
00000000350}
351```
352```
353type universe_record = {
000000000000354355+}
356```
0357```
358+type variant =
359+| TagA (** This comment is for TagA. *)
360+| ConstrB of int (** This comment is for ConstrB. *)
361+| ConstrC of int * int (** This comment is for binary ConstrC. *)
362+| ConstrD of int * int (** This comment is for unary ConstrD of binary tuple. *)
00000000363364```
365This comment is for `variant`.
···367This comment is also for `variant`.
368369```
370+type poly_variant = [
00371| `TagA
00372| `ConstrB of int
373+]
00374```
375This comment is for `poly_variant`.
376377Wow\! It was a polymorphic variant\!
378379```
380+type (_, _) full_gadt =
381+| Tag : (unit, unit) Ocamlary.full_gadt
382+| First : 'a -> ('a, unit) Ocamlary.full_gadt
383+| Second : 'a -> (unit, 'a) Ocamlary.full_gadt
384+| Exist : 'a * 'b -> ('b, unit) Ocamlary.full_gadt
0000000000385386```
387This comment is for `full_gadt`.
···389Wow\! It was a GADT\!
390391```
392+type 'a partial_gadt =
393+| AscribeTag : 'a Ocamlary.partial_gadt
394+| OfTag of 'a Ocamlary.partial_gadt
395+| ExistGadtTag : ('a -> 'b) -> 'a Ocamlary.partial_gadt
00000000396397```
398This comment is for `partial_gadt`.
···400Wow\! It was a mixed GADT\!
401402```
403+type alias = Ocamlary.variant
404```
405This comment is for `alias`.
406407```
408+type tuple =
409+ (Ocamlary.alias * Ocamlary.alias)
410+ * Ocamlary.alias
411+ * (Ocamlary.alias * Ocamlary.alias)
412```
413This comment is for `tuple`.
414415```
416+type variant_alias = Ocamlary.variant =
00417| TagA
00418| ConstrB of int
00419| ConstrC of int * int
00420| ConstrD of int * int
00421422```
423This comment is for `variant_alias`.
424425```
426+type record_alias = Ocamlary.record = {
427+428+00429}
430```
431This comment is for `record_alias`.
432433```
434+type poly_variant_union = [
435+| Ocamlary.poly_variant
0000436| `TagC
437+]
00438```
439This comment is for `poly_variant_union`.
440441```
442+type 'a poly_poly_variant = [
00443| `TagA of 'a
444+]
00000445```
446```
447+type ('a, 'b) bin_poly_poly_variant = [
448| `TagA of 'a
00449| `ConstrB of 'b
450+]
00451```
452```
453type 'a open_poly_variant = [> `TagA ] as 'a
···456type 'a open_poly_variant2 = [> `ConstrB of int ] as 'a
457```
458```
459+type 'a open_poly_variant_alias =
460+ 'a Ocamlary.open_poly_variant Ocamlary.open_poly_variant2
461```
462```
463type 'a poly_fun = ([> `ConstrB of int ] as 'a) -> 'a
···472type 'a clopen_poly_variant = [< `One | `Two of int | `Three Two Three ] as 'a
473```
474```
475+type nested_poly_variant = [
00476| `A
00477| `B of [ `B1 | `B2 ]
00478| `C
00479| `D of [ `D1 of [ `D1a ] ]
480+]
00000000481```
482```
483+type ('a, 'b) full_gadt_alias = ('a, 'b) Ocamlary.full_gadt =
484+| Tag : (unit, unit) Ocamlary.full_gadt_alias
485+| First : 'a -> ('a, unit) Ocamlary.full_gadt_alias
486+| Second : 'a -> (unit, 'a) Ocamlary.full_gadt_alias
487+| Exist : 'a * 'b -> ('b, unit) Ocamlary.full_gadt_alias
0000488489```
490This comment is for `full_gadt_alias`.
491492```
493+type 'a partial_gadt_alias = 'a Ocamlary.partial_gadt =
494+| AscribeTag : 'a Ocamlary.partial_gadt_alias
495+| OfTag of 'a Ocamlary.partial_gadt_alias
496+| ExistGadtTag : ('a -> 'b) -> 'a Ocamlary.partial_gadt_alias
00000000497498```
499This comment is for `partial_gadt_alias`.
···504This comment is for [`Exn_arrow`](./#exception-Exn_arrow).
505506```
507+type mutual_constr_a =
00508| A
509+| B_ish of Ocamlary.mutual_constr_b (** This comment is between mutual_constr_a and mutual_constr_b. *)
000000510511```
512This comment is for [`mutual_constr_a`](./#type-mutual_constr_a) then [`mutual_constr_b`](./#type-mutual_constr_b).
513514```
515+and mutual_constr_b =
00516| B
517+| A_ish of Ocamlary.mutual_constr_a (** This comment must be here for the next to associate correctly. *)
000000518519```
520This comment is for [`mutual_constr_b`](./#type-mutual_constr_b) then [`mutual_constr_a`](./#type-mutual_constr_a).
521522```
523+type rec_obj = < f : int ; g : unit -> unit ; h : Ocamlary.rec_obj >
524```
525```
526type 'a open_obj = < f : int ; g : unit -> unit.. > as 'a
···543A mystery wrapped in an ellipsis
544545```
546+type Ocamlary.ext +=
00547| ExtA
00548549```
550```
551+type Ocamlary.ext +=
00552| ExtB
00553554```
555```
556+type Ocamlary.ext +=
00557| ExtC of unit
558+| ExtD of Ocamlary.ext
0000559560```
561```
562+type Ocamlary.ext +=
00563| ExtE
00564565```
566```
567+type Ocamlary.ext += private
00568| ExtF
00569570```
571```
···574'a poly\_ext
575576```
577+type Ocamlary.poly_ext +=
00578| Foo of 'b
579+| Bar of 'b * 'b (** 'b poly_ext *)
0000580581```
0582```
583+type Ocamlary.poly_ext +=
584+| Quux of 'c (** 'c poly_ext *)
0000000585586```
587```
588module ExtMod : sig ... end
589```
590```
591+type Ocamlary.ExtMod.t +=
592+| ZzzTop0 (** It's got the rock *)
0000593594```
0595```
596+type Ocamlary.ExtMod.t +=
597+| ZzzTop of unit (** and it packs a unit. *)
0000000598599```
600```
···603Rotate keys on my mark...
604605```
606+type my_mod = (module Ocamlary.COLLECTION)
607```
608A brown paper package tied up with string
609···644module Dep5 (Arg : sig ... end) : sig ... end
645```
646```
647+type dep2 = Ocamlary.Dep5(Ocamlary.Dep4).Z.X.b
648```
649```
650type dep3 = Dep5(Dep4).Z.Y.a
···656module Dep7 (Arg : sig ... end) : sig ... end
657```
658```
659+type dep4 = Ocamlary.Dep7(Ocamlary.Dep6).M.Y.d
660```
661```
662module Dep8 : sig ... end
···665module Dep9 (X : sig ... end) : sig ... end
666```
667```
668+module type Dep10 = Ocamlary.Dep9(Ocamlary.Dep8).T with type t = int
669```
670```
671module Dep11 : sig ... end
···674module Dep12 (Arg : sig ... end) : sig ... end
675```
676```
677+module Dep13 : Ocamlary.Dep12(Ocamlary.Dep11).T
678```
679```
680+type dep5 = Ocamlary.Dep13.c
681```
682```
683module type With1 = sig ... end
···686module With2 : sig ... end
687```
688```
689+module With3 : Ocamlary.With1 with module M = Ocamlary.With2
690```
691```
692+type with1 = Ocamlary.With3.N.t
693```
694```
695+module With4 : Ocamlary.With1 with module M := Ocamlary.With2
696```
697```
698+type with2 = Ocamlary.With4.N.t
699```
700```
701module With5 : sig ... end
···708```
709```
710module type With8 =
711+ Ocamlary.With7(Ocamlary.With6).T
712+ with module M = Ocamlary.With5
713+ and type M.N.t = Ocamlary.With5.N.t
714```
715```
716module With9 : sig ... end
···719module With10 : sig ... end
720```
721```
722+module type With11 =
723+ Ocamlary.With7(Ocamlary.With10).T
724+ with module M = Ocamlary.With9
725+ and type N.t = int
726```
727```
728module type NestedInclude1 = sig ... end
···829type new_t = ..
830```
831```
832+type Ocamlary.new_t +=
00833| C
00834835```
836```
837+module type TypeExtPruned = Ocamlary.TypeExt with type t := Ocamlary.new_t
838```
839```
840module Op : sig ... end
+8
odoc/test/generators/markdown/Recent-X.md
···2# Module `Recent.X`
34```
05module L := Z.Y
0006```
7```
8type t = int L.X.t
···11type u := int
12```
13```
014type v = u L.X.t
00015```
···2# Module `Recent.X`
34```
5+<<<<<<< HEAD
6module L := Z.Y
7+=======
8+module L := Recent.Z.Y
9+>>>>>>> baf34b7f4 (Add markdown to generator tests)
10```
11```
12type t = int L.X.t
···15type u := int
16```
17```
18+<<<<<<< HEAD
19type v = u L.X.t
20+=======
21+type v = Recent.X.u L.X.t
22+>>>>>>> baf34b7f4 (Add markdown to generator tests)
23```
···5## Parameters
67```
08module _ : S
0009```
1011## Signature
···5## Parameters
67```
8+<<<<<<< HEAD
9module _ : S
10+=======
11+module _ : Recent.S
12+>>>>>>> baf34b7f4 (Add markdown to generator tests)
13```
1415## Signature
+45
odoc/test/generators/markdown/Recent.md
···5module type S = sig ... end
6```
7```
08module type S1 = functor (_ : S) -> S
9```
10```
···7879```
80 ]
000000000000000000000000000000081```
82```
83type empty_variant = |
···86type nonrec nonrec_ = int
87```
88```
089type empty_conj =
90```
91```
···101| X : [< `X of int & [< `B of int & float ] ] -> conj
102```
103```
000000000104105```
106```
···117```
118```
119module type PolyS = sig ... end
0120```
121```
122type +-'a phantom
123```
124```
125val f : (x:int * y:int) phantom -> unit
00126```
···5module type S = sig ... end
6```
7```
8+<<<<<<< HEAD
9module type S1 = functor (_ : S) -> S
10```
11```
···7980```
81 ]
82+=======
83+module type S1 = functor (_ : Recent.S) -> Recent.S
84+```
85+```
86+type variant =
87+| A
88+| B of int
89+| C (** foo *)
90+| D (** bar *)
91+| E of {
92+a : int;
93+}
94+95+```
96+```
97+type _ gadt =
98+| A : int Recent.gadt
99+| B : int -> string Recent.gadt (** foo *)
100+| C : {
101+a : int;
102+} -> unit Recent.gadt
103+104+```
105+```
106+type polymorphic_variant = [
107+| `A
108+| `B of int
109+| `C (** foo *)
110+| `D (** bar *)
111+]
112+>>>>>>> baf34b7f4 (Add markdown to generator tests)
113```
114```
115type empty_variant = |
···118type nonrec nonrec_ = int
119```
120```
121+<<<<<<< HEAD
122type empty_conj =
123```
124```
···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+141+```
142+```
143+type conj =
144+| X : [< `X of int & [< `B of int & float ] ] -> Recent.conj
145+>>>>>>> baf34b7f4 (Add markdown to generator tests)
146147```
148```
···159```
160```
161module type PolyS = sig ... end
162+<<<<<<< HEAD
163```
164```
165type +-'a phantom
166```
167```
168val f : (x:int * y:int) phantom -> unit
169+=======
170+>>>>>>> baf34b7f4 (Add markdown to generator tests)
171```
+1-5
odoc/test/generators/markdown/Recent_impl-B.md
···2# Module `Recent_impl.B`
34```
5-type t =
6-```
7-```
8| B
9-```
10-```
1112```
···2# Module `Recent_impl.B`
34```
5+type t =
006| B
0078```
···5module Foo : sig ... end
6```
7```
8-type foo =
9-```
10-```
11-| Bar of Foo.t
12-```
13-```
1415```
16```
17-type bar =
18-```
19-```
20| Bar of {
21-```
22-`field : Foo.t;`
23-```
24}
25-```
26-```
2728```
29```
30-type foo_ =
31-```
32-```
33-| Bar_ of int * Foo.t * int
34-```
35-```
3637```
38```
39-type bar_ =
40-```
41-```
42-| Bar__ of Foo.t option
43-```
44-```
4546```
47```
48-type another_foo =
49-```
50-```
51-| Bar of Another_Foo.t
52-```
53-```
5455```
56```
57-type another_bar =
58-```
59-```
60| Bar of {
61-```
62-`field : Another_Foo.t;`
63-```
64}
65-```
66-```
6768```
69```
70-type another_foo_ =
71-```
72-```
73-| Bar_ of int * Another_Foo.t * int
74-```
75-```
7677```
78```
79-type another_bar_ =
80-```
81-```
82-| Bar__ of Another_Foo.t option
83-```
84-```
8586```
···5module Foo : sig ... end
6```
7```
8+type foo =
9+| Bar of Stop_dead_link_doc.Foo.t
00001011```
12```
13+type bar =
0014| Bar of {
15+0016}
001718```
19```
20+type foo_ =
21+| Bar_ of int * Stop_dead_link_doc.Foo.t * int
00002223```
24```
25+type bar_ =
26+| Bar__ of Stop_dead_link_doc.Foo.t option
00002728```
29```
30+type another_foo =
31+| Bar of Stop_dead_link_doc.Another_Foo.t
00003233```
34```
35+type another_bar =
0036| Bar of {
37+0038}
003940```
41```
42+type another_foo_ =
43+| Bar_ of int * Stop_dead_link_doc.Another_Foo.t * int
00004445```
46```
47+type another_bar_ =
48+| Bar__ of Stop_dead_link_doc.Another_Foo.t option
00004950```
···44Doc of `M''`, part 1\.
4546```
47-module Alias : T
48```
49Doc of `Alias`.
50
···44Doc of `M''`, part 1\.
4546```
47+module Alias : Toplevel_comments.T
48```
49Doc of `Alias`.
50
+46-130
odoc/test/generators/markdown/Type.md
···43type nested_pair = (int * int) * int
44```
45```
46-type instance = int constructor
47```
48```
49type long =
50- labeled_higher_order ->
51- [ `Bar | `Baz of triple ] ->
52- pair ->
53- labeled ->
54- higher_order ->
55 (string -> int) ->
56 (int * float * char * string * char * unit) option ->
57- nested_pair ->
58- arrow ->
59 string ->
60- nested_pair array
61```
62```
63type variant_e = {
64-```
65-`a : int;`
66-```
67}
68```
69```
70-type variant =
71-```
72-```
73| A
74-```
75-```
76| B of int
77-```
78-```
79-| C
80-```
81-foo
82-83-```
84-| D
85-```
86-*bar*
87-88-```
89-| E of variant_e
90-```
91-```
9293```
94```
95type variant_c = {
96-```
97-`a : int;`
98-```
99}
100```
101```
102-type _ gadt =
103-```
104-```
105-| A : int gadt
106-```
107-```
108-| B : int -> string gadt
109-```
110-```
111-| C : variant_c -> unit gadt
112-```
113-```
114115```
116```
117-type degenerate_gadt =
118-```
119-```
120-| A : degenerate_gadt
121-```
122-```
123124```
125```
126-type private_variant = private
127-```
128-```
129| A
130-```
131-```
132133```
134```
135type record = {
136-```
137-`a : int;`
138-`mutable b : int;`
139-`c : int;`
140-foo
141142-`d : int;`
143-*bar*
144145-`e : 'a. 'a;`
146-```
0147}
148```
149```
150-type polymorphic_variant = [
151-```
152-```
153| `A
154-```
155-```
156| `B of int
157-```
158-```
159| `C of int * unit
160-```
161-```
162| `D
163-```
164-```
165- ]
166-```
167-```
168-type polymorphic_variant_extension = [
169-```
170-```
171-| polymorphic_variant
172```
173```
00174| `E
175-```
176-```
177- ]
178-```
179-```
180-type nested_polymorphic_variant = [
181```
182```
0183| `A of [ `B | `C ]
184-```
185-```
186- ]
187-```
188-```
189-type private_extenion = private [>
190-```
191-```
192-| polymorphic_variant
193```
194```
195- ]
00196```
197```
198type object_ = < a : int ; b : int ; c : int >
···201module type X = sig ... end
202```
203```
204-type module_ = (module X)
205```
206```
207-type module_substitution = (module X with type t = int and type u = unit)
208```
209```
210type +'a covariant
···219type ('a, 'b) binary
220```
221```
222-type using_binary = (int, int) binary
223```
224```
225type 'custom name
···240type 'a upper_variant = 'a constraint 'a = [< `A | `B of int ]
241```
242```
243-type 'a named_variant = 'a constraint 'a = [< polymorphic_variant ]
244```
245```
246type 'a exact_object = 'a constraint 'a = < a : int ; b : int >
···261type extensible = ..
262```
263```
264-type extensible +=
265-```
266-```
267-| Extension
268-```
269-Documentation for [`Extension`](./#extension-Extension).
270-271-```
272-| Another_extension
273-```
274-Documentation for [`Another_extension`](./#extension-Another_extension).
275-276-```
277278```
279```
280-type mutually =
281-```
282-```
283-| A of recursive
284-```
285-```
286287```
288```
289-and recursive =
290-```
291-```
292-| B of mutually
293-```
294-```
295296```
297```
···43type nested_pair = (int * int) * int
44```
45```
46+type instance = int Type.constructor
47```
48```
49type long =
50+ Type.labeled_higher_order ->
51+ [ `Bar | `Baz of Type.triple ] ->
52+ Type.pair ->
53+ Type.labeled ->
54+ Type.higher_order ->
55 (string -> int) ->
56 (int * float * char * string * char * unit) option ->
57+ Type.nested_pair ->
58+ Type.arrow ->
59 string ->
60+ Type.nested_pair array
61```
62```
63type variant_e = {
64+0065}
66```
67```
68+type variant =
0069| A
0070| B of int
71+| C (** foo *)
72+| D (** bar *)
73+| E of Type.variant_e
0000000000007475```
76```
77type variant_c = {
78+0079}
80```
81```
82+type _ gadt =
83+| A : int Type.gadt
84+| B : int -> string Type.gadt
85+| C : Type.variant_c -> unit Type.gadt
000000008687```
88```
89+type degenerate_gadt =
90+| A : Type.degenerate_gadt
00009192```
93```
94+type private_variant = private
0095| A
009697```
98```
99type record = {
0000010000101102+ (** foo *)
103+ (** bar *)
104+105}
106```
107```
108+type polymorphic_variant = [
00109| `A
00110| `B of int
00111| `C of int * unit
00112| `D
113+]
00000000114```
115```
116+type polymorphic_variant_extension = [
117+| Type.polymorphic_variant
118| `E
119+]
00000120```
121```
122+type nested_polymorphic_variant = [
123| `A of [ `B | `C ]
124+]
00000000125```
126```
127+type private_extenion = private [>
128+| Type.polymorphic_variant
129+]
130```
131```
132type object_ = < a : int ; b : int ; c : int >
···135module type X = sig ... end
136```
137```
138+type module_ = (module Type.X)
139```
140```
141+type module_substitution = (module Type.X with type t = int and type u = unit)
142```
143```
144type +'a covariant
···153type ('a, 'b) binary
154```
155```
156+type using_binary = (int, int) Type.binary
157```
158```
159type 'custom name
···174type 'a upper_variant = 'a constraint 'a = [< `A | `B of int ]
175```
176```
177+type 'a named_variant = 'a constraint 'a = [< Type.polymorphic_variant ]
178```
179```
180type 'a exact_object = 'a constraint 'a = < a : int ; b : int >
···195type extensible = ..
196```
197```
198+type Type.extensible +=
199+| Extension (** Documentation for Extension. *)
200+| Another_extension (** Documentation for Another_extension. *)
0000000000201202```
203```
204+type mutually =
205+| A of Type.recursive
0000206207```
208```
209+and recursive =
210+| B of Type.mutually
0000211212```
213```
+3-3
odoc/test/integration/markdown.t/run.t
···46 ### Section 2
4748 ```
49- val v : t
50 ```
51 A very important value
52···84 type 'a t = 'a list
85 ```
86 ```
87- val head : 'a t -> 'a option
88 ```
89 ```
90- val headExn : 'a t -> 'a
91 ```
9293 $ cat markdown/test/page.md
···46 ### Section 2
4748 ```
49+ val v : Test.t
50 ```
51 A very important value
52···84 type 'a t = 'a list
85 ```
86 ```
87+ val head : 'a Test.List.t -> 'a option
88 ```
89 ```
90+ val headExn : 'a Test.List.t -> 'a
91 ```
9293 $ cat markdown/test/page.md
···1+(** A module demonstrating ADT with many constructors for markdown output testing. *)
2+3+(** A color type with many variants representing different colors and color properties. *)
4+type color =
5+ | Red (** Primary red color *)
6+ | Green (** Primary green color *)
7+ | Blue (** Primary blue color *)
8+ | Yellow (** Yellow color (red + green) *)
9+ | Cyan (** Cyan color (green + blue) *)
10+ | Magenta (** Magenta color (red + blue) *)
11+ | Orange (** Orange color *)
12+ | Purple (** Purple color *)
13+ | Pink (** Pink color *)
14+ | Brown (** Brown color *)
15+ | Black (** Black color (absence of light) *)
16+ | White (** White color (all colors combined) *)
17+ | Gray (** Gray color *)
18+ | Silver (** Silver color *)
19+ | Gold (** Gold color *)
20+ | Maroon (** Dark red color *)
21+ | Navy (** Dark blue color *)
22+ | Teal (** Dark cyan color *)
23+ | Lime (** Bright green color *)
24+ | Olive (** Dark yellow-green color *)
25+ | Aqua (** Light blue-green color *)
26+ | Fuchsia (** Bright pink-purple color *)
27+ | Indigo (** Deep blue-purple color *)
28+ | Violet (** Blue-purple color *)
29+ | Turquoise (** Blue-green color *)
30+ | Coral (** Orange-pink color *)
31+ | Salmon (** Light orange-pink color *)
32+ | Crimson (** Deep red color *)
33+ | Scarlet (** Bright red color *)
34+ | Azure (** Light blue color *)
35+ | Beige (** Light brown color *)
36+ | Khaki (** Light brown-green color *)
37+ | Lavender (** Light purple color *)
38+ | Mint (** Light green color *)
39+ | Peach (** Light orange color *)
40+ | Plum (** Dark purple color *)
41+ | Rust (** Orange-red color *)
42+ | Tan (** Light brown color *)
43+ | Ivory (** Off-white color *)
44+ | Pearl (** Lustrous white color *)
45+ | RGB of int * int * int (** RGB color with red, green, blue values (0-255) *)
46+ | RGBA of int * int * int * float (** RGBA color with alpha transparency (0.0-1.0) *)
47+ | HSL of int * int * int (** HSL color with hue (0-360), saturation, lightness (0-100) *)
48+ | HSV of int * int * int (** HSV color with hue (0-360), saturation, value (0-100) *)
49+ | CMYK of int * int * int * int (** CMYK color for printing (0-100 each) *)
50+ | Hex of string (** Hexadecimal color representation (e.g., "#FF0000") *)
51+ | Named of string (** Named color (e.g., "forestgreen", "dodgerblue") *)
52+ | Gradient of color * color (** Gradient between two colors *)
53+ | Pattern of color list (** Pattern of multiple colors *)
54+ | Custom of string * (int * int * int) (** Custom color with name and RGB values *)
55+56+(** Brightness levels for colors. *)
57+type brightness =
58+ | VeryDark (** Very dark variant *)
59+ | Dark (** Dark variant *)
60+ | Normal (** Normal brightness *)
61+ | Light (** Light variant *)
62+ | VeryLight (** Very light variant *)
63+64+(** Color temperature classification. *)
65+type temperature =
66+ | VeryWarm (** Very warm colors (reds, oranges) *)
67+ | Warm (** Warm colors *)
68+ | Neutral (** Neutral temperature *)
69+ | Cool (** Cool colors *)
70+ | VeryCool (** Very cool colors (blues, purples) *)
71+72+(** A function to get the default RGB values for a color. *)
73+val to_rgb : color -> int * int * int
74+75+(** Convert a color to its brightness classification. *)
76+val get_brightness : color -> brightness
77+78+(** Get the temperature classification of a color. *)
79+val get_temperature : color -> temperature
80+81+(** Mix two colors together. *)
82+val mix_colors : color -> color -> color
83+84+(** Create a complementary color. *)
85+val complement : color -> color
···1+Test the markdown output for a module with an ADT containing many constructors.
2+This test verifies that the markdown generator properly handles large ADTs with
3+various constructor types including simple variants, variants with parameters,
4+and proper documentation rendering.
5+6+ $ ocamlc -c -bin-annot colors.mli
7+ $ odoc compile --package colors colors.cmti
8+ $ odoc link colors.odoc
9+ $ odoc markdown-generate colors.odocl -o markdown
10+11+ $ cat markdown/colors/Colors.md
12+13+ # Module `Colors`
14+15+ A module demonstrating ADT with many constructors for markdown output testing.
16+17+ ```
18+ type color =
19+ | Red (** Primary red color *)
20+ | Green (** Primary green color *)
21+ | Blue (** Primary blue color *)
22+ | Yellow (** Yellow color (red + green) *)
23+ | Cyan (** Cyan color (green + blue) *)
24+ | Magenta (** Magenta color (red + blue) *)
25+ | Orange (** Orange color *)
26+ | Purple (** Purple color *)
27+ | Pink (** Pink color *)
28+ | Brown (** Brown color *)
29+ | Black (** Black color (absence of light) *)
30+ | White (** White color (all colors combined) *)
31+ | Gray (** Gray color *)
32+ | Silver (** Silver color *)
33+ | Gold (** Gold color *)
34+ | Maroon (** Dark red color *)
35+ | Navy (** Dark blue color *)
36+ | Teal (** Dark cyan color *)
37+ | Lime (** Bright green color *)
38+ | Olive (** Dark yellow-green color *)
39+ | Aqua (** Light blue-green color *)
40+ | Fuchsia (** Bright pink-purple color *)
41+ | Indigo (** Deep blue-purple color *)
42+ | Violet (** Blue-purple color *)
43+ | Turquoise (** Blue-green color *)
44+ | Coral (** Orange-pink color *)
45+ | Salmon (** Light orange-pink color *)
46+ | Crimson (** Deep red color *)
47+ | Scarlet (** Bright red color *)
48+ | Azure (** Light blue color *)
49+ | Beige (** Light brown color *)
50+ | Khaki (** Light brown-green color *)
51+ | Lavender (** Light purple color *)
52+ | Mint (** Light green color *)
53+ | Peach (** Light orange color *)
54+ | Plum (** Dark purple color *)
55+ | Rust (** Orange-red color *)
56+ | Tan (** Light brown color *)
57+ | Ivory (** Off-white color *)
58+ | Pearl (** Lustrous white color *)
59+ | RGB of int * int * int (** RGB color with red, green, blue values (0-255) *)
60+ | RGBA of int * int * int * float (** RGBA color with alpha transparency (0.0-1.0) *)
61+ | HSL of int * int * int (** HSL color with hue (0-360), saturation, lightness (0-100) *)
62+ | HSV of int * int * int (** HSV color with hue (0-360), saturation, value (0-100) *)
63+ | CMYK of int * int * int * int (** CMYK color for printing (0-100 each) *)
64+ | Hex of string (** Hexadecimal color representation (e.g., "#FF0000") *)
65+ | Named of string (** Named color (e.g., "forestgreen", "dodgerblue") *)
66+ | Gradient of Colors.color * Colors.color (** Gradient between two colors *)
67+ | Pattern of Colors.color list (** Pattern of multiple colors *)
68+ | Custom of string * int * int * int (** Custom color with name and RGB values *)
69+70+ ```
71+ A color type with many variants representing different colors and color properties.
72+73+ ```
74+ type brightness =
75+ | VeryDark (** Very dark variant *)
76+ | Dark (** Dark variant *)
77+ | Normal (** Normal brightness *)
78+ | Light (** Light variant *)
79+ | VeryLight (** Very light variant *)
80+81+ ```
82+ Brightness levels for colors.
83+84+ ```
85+ type temperature =
86+ | VeryWarm (** Very warm colors (reds, oranges) *)
87+ | Warm (** Warm colors *)
88+ | Neutral (** Neutral temperature *)
89+ | Cool (** Cool colors *)
90+ | VeryCool (** Very cool colors (blues, purples) *)
91+92+ ```
93+ Color temperature classification.
94+95+ ```
96+ val to_rgb : Colors.color -> int * int * int
97+ ```
98+ A function to get the default RGB values for a color.
99+100+ ```
101+ val get_brightness : Colors.color -> Colors.brightness
102+ ```
103+ Convert a color to its brightness classification.
104+105+ ```
106+ val get_temperature : Colors.color -> Colors.temperature
107+ ```
108+ Get the temperature classification of a color.
109+110+ ```
111+ val mix_colors : Colors.color -> Colors.color -> Colors.color
112+ ```
113+ Mix two colors together.
114+115+ ```
116+ val complement : Colors.color -> Colors.color
117+ ```
118+ Create a complementary color.
···1+(** Base module with some types and functions *)
2+3+type t = int
4+(** A simple type *)
5+6+val value : t
7+(** A value of type t *)
8+9+val function_in_base : t -> t
10+(** A function in the base module *)
+11
odoc/test/markdown/include_test.t/main.mli
···00000000000
···1+(** Main module that includes Base *)
2+3+type base_t = int
4+val base_value : base_t
5+val base_function : base_t -> base_t
6+7+include module type of Base
8+(** This includes all definitions from Base module *)
9+10+val additional_function : base_t -> base_t
11+(** An additional function in the main module *)
+40
odoc/test/markdown/include_test.t/run.t
···0000000000000000000000000000000000000000
···1+Test module includes in markdown output.
2+3+ $ ocamlc -c -bin-annot base.mli
4+ $ ocamlc -c -bin-annot main.mli
5+ $ odoc compile --package test base.cmti
6+ $ odoc compile --package test main.cmti
7+ $ odoc link base.odoc
8+ $ odoc link main.odoc
9+ $ odoc markdown-generate main.odocl -o markdown
10+11+ $ cat markdown/test/Main.md
12+13+ # Module `Main`
14+15+ Main module that includes Base
16+17+ ```
18+ type base_t = int
19+ ```
20+ ```
21+ val base_value : Main.base_t
22+ ```
23+ ```
24+ val base_function : Main.base_t -> Main.base_t
25+ ```
26+ This includes all definitions from Base module
27+28+ ```
29+ type t = int
30+ ```
31+ ```
32+ val value : Main.t
33+ ```
34+ ```
35+ val function_in_base : Main.t -> Main.t
36+ ```
37+ ```
38+ val additional_function : Main.base_t -> Main.base_t
39+ ```
40+ An additional function in the main module
···1+(** A module demonstrating polymorphic variants for markdown output testing. *)
2+3+(** A polymorphic variant type with many constructors. *)
4+type color = [
5+ | `Red (** Primary red color *)
6+ | `Green (** Primary green color *)
7+ | `Blue (** Primary blue color *)
8+ | `Yellow (** Yellow color *)
9+ | `Orange (** Orange color *)
10+ | `Purple (** Purple color *)
11+ | `RGB of int * int * int (** RGB values *)
12+ | `Named of string (** Named color *)
13+]
14+15+(** Simple fixed polymorphic variant. *)
16+type status = [ `Active | `Inactive of string ]
17+18+(** Another simple polymorphic variant. *)
19+type simple = [ `A | `B | `C ]
+43
odoc/test/markdown/polymorphic_variants.t/run.t
···0000000000000000000000000000000000000000000
···1+Test polymorphic variant formatting in markdown output.
2+3+ $ ocamlc -c -bin-annot polymorphic_variants.mli
4+ $ odoc compile --package test polymorphic_variants.cmti
5+ $ odoc link polymorphic_variants.odoc
6+ $ odoc markdown-generate polymorphic_variants.odocl -o markdown
7+8+ $ cat markdown/test/Polymorphic_variants.md
9+10+ # Module `Polymorphic_variants`
11+12+ A module demonstrating polymorphic variants for markdown output testing.
13+14+ ```
15+ type color = [
16+ | `Red (** Primary red color *)
17+ | `Green (** Primary green color *)
18+ | `Blue (** Primary blue color *)
19+ | `Yellow (** Yellow color *)
20+ | `Orange (** Orange color *)
21+ | `Purple (** Purple color *)
22+ | `RGB of int * int * int (** RGB values *)
23+ | `Named of string (** Named color *)
24+ ]
25+ ```
26+ A polymorphic variant type with many constructors.
27+28+ ```
29+ type status = [
30+ | `Active
31+ | `Inactive of string
32+ ]
33+ ```
34+ Simple fixed polymorphic variant.
35+36+ ```
37+ type simple = [
38+ | `A
39+ | `B
40+ | `C
41+ ]
42+ ```
43+ Another simple polymorphic variant.