diff --git a/src/utils/odoc_utils.ml b/src/utils/odoc_utils.ml index f237b320ad..7e047d4b92 100644 --- a/src/utils/odoc_utils.ml +++ b/src/utils/odoc_utils.ml @@ -1,3 +1,6 @@ +(** Re-export for compatibility with 4.02. *) +type ('a, 'b) result = ('a, 'b) Result.result = Ok of 'a | Error of 'b + (** The [result] type and a bind operator. This module is meant to be opened. *) module ResultMonad = struct (** Re-export for compat *) @@ -43,6 +46,8 @@ module EitherMonad = struct end module List = struct + include List + let rec concat_map ?sep ~f = function | [] -> [] | [ x ] -> f x diff --git a/src/xref2/env.ml b/src/xref2/env.ml index 88a1f76346..1c27d2f794 100644 --- a/src/xref2/env.ml +++ b/src/xref2/env.ml @@ -2,6 +2,7 @@ open Odoc_model open Odoc_model.Names open Odoc_model.Paths +open Odoc_utils type lookup_unit_result = Forward_reference | Found of Lang.Compilation_unit.t diff --git a/src/xref2/env.mli b/src/xref2/env.mli index f54ab5eaea..c6378b92b6 100644 --- a/src/xref2/env.mli +++ b/src/xref2/env.mli @@ -2,6 +2,7 @@ open Odoc_model open Odoc_model.Paths +open Odoc_utils type lookup_unit_result = Forward_reference | Found of Lang.Compilation_unit.t diff --git a/test/integration/dune b/test/integration/dune index 13da4888b8..0d27fb102d 100644 --- a/test/integration/dune +++ b/test/integration/dune @@ -6,3 +6,8 @@ (applies_to json_expansion_with_sources) (enabled_if (> %{ocaml_version} 4.14.0))) + +(cram + (applies_to html_support_files) + (enabled_if + (> %{ocaml_version} 4.14.0)))