Skip to content

Commit

Permalink
Compat with 4.02
Browse files Browse the repository at this point in the history
  • Loading branch information
Julow authored and panglesd committed Jul 12, 2024
1 parent 1862c3a commit 13200ed
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/utils/odoc_utils.ml
Original file line number Diff line number Diff line change
@@ -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 *)
Expand Down Expand Up @@ -43,6 +46,8 @@ module EitherMonad = struct
end

module List = struct
include List

let rec concat_map ?sep ~f = function
| [] -> []
| [ x ] -> f x
Expand Down
1 change: 1 addition & 0 deletions src/xref2/env.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 1 addition & 0 deletions src/xref2/env.mli
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 5 additions & 0 deletions test/integration/dune
Original file line number Diff line number Diff line change
Expand Up @@ -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)))

0 comments on commit 13200ed

Please sign in to comment.