From 6957ee796ba46e629a7613021b15d9918baeaa99 Mon Sep 17 00:00:00 2001 From: Jules Aguillon Date: Tue, 12 Sep 2023 14:45:10 +0200 Subject: [PATCH] .ocamlformat: Set ocaml-version --- .ocamlformat | 1 + src/document/url.ml | 2 +- src/odoc/source_tree.ml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.ocamlformat b/.ocamlformat index 1266b833e7..5626d8362a 100644 --- a/.ocamlformat +++ b/.ocamlformat @@ -1,2 +1,3 @@ module-item-spacing=preserve version=0.26.1 +ocaml-version=4.02 diff --git a/src/document/url.ml b/src/document/url.ml index 1b3528888e..0f2be81658 100644 --- a/src/document/url.ml +++ b/src/document/url.ml @@ -258,7 +258,7 @@ module Anchor = struct | None -> assert false (* We got a root, should never happen *) | Some page -> let anchor = Printf.sprintf "%s-%s" (Path.string_of_kind kind) name in - { page; anchor; kind :> kind } + { page; anchor; kind = (kind :> kind) } let add_suffix ~kind { page; anchor; _ } suffix = { page; anchor = anchor ^ "." ^ suffix; kind } diff --git a/src/odoc/source_tree.ml b/src/odoc/source_tree.ml index 4e9963948a..7682cea9b6 100644 --- a/src/odoc/source_tree.ml +++ b/src/odoc/source_tree.ml @@ -32,7 +32,7 @@ let compile ~resolver ~parent ~output ~warnings_options:_ input = parse_input_file input >>= fun (digest, source_tree) -> let root = let file = Root.Odoc_file.create_page root_name in - { Root.id :> Id.OdocId.t; file; digest } + { Root.id = (id :> Id.OdocId.t); file; digest } in let source_children = List.rev_map (source_child_id id) source_tree in let page =