Skip to content

Commit 65ce219

Browse files
committed
Support compiling against result library
1 parent 979fe9c commit 65ce219

File tree

8 files changed

+9
-9
lines changed

8 files changed

+9
-9
lines changed

src/model/semantics.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ let tag :
300300
Ast.ocamldoc_tag ->
301301
( Comment.block_element with_location,
302302
internal_tags_removed with_location )
303-
Result.result =
303+
Result.t =
304304
fun ~location status tag ->
305305
if not status.tags_allowed then
306306
(* Trigger a warning but do not remove the tag. Avoid turning tags into

src/odoc/extract_code.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ val extract :
44
names:string list ->
55
line_directives:bool ->
66
warnings_options:Odoc_model.Error.warnings_options ->
7-
(unit, [> `Msg of string ]) result
7+
(unit, [> `Msg of string ]) Result.t

src/odoc/or_error.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
type ('a, 'e) result = ('a, 'e) Result.result = Ok of 'a | Error of 'e
1+
type ('a, 'e) result = ('a, 'e) Result.t = Ok of 'a | Error of 'e
22

33
type msg = [ `Msg of string ]
44

src/odoc/or_error.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(** Re-export for compatibility with 4.02 *)
2-
type ('a, 'e) result = ('a, 'e) Result.result = Ok of 'a | Error of 'e
2+
type ('a, 'e) result = ('a, 'e) Result.t = Ok of 'a | Error of 'e
33

44
type msg = [ `Msg of string ]
55

src/utils/odoc_utils.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
(** Re-export for compatibility with 4.02. *)
2-
type ('a, 'b) result = ('a, 'b) Result.result = Ok of 'a | Error of 'b
2+
type ('a, 'b) result = ('a, 'b) Result.t = Ok of 'a | Error of 'b
33

44
(** The [result] type and a bind operator. This module is meant to be opened. *)
55
module ResultMonad = struct
66
(** Re-export for compat *)
7-
type ('a, 'b) result = ('a, 'b) Result.result = Ok of 'a | Error of 'b
7+
type ('a, 'b) result = ('a, 'b) Result.t = Ok of 'a | Error of 'b
88

99
let map_error f = function Ok _ as ok -> ok | Error e -> Error (f e)
1010

src/xref2/env.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ type 'a scope = {
496496
root : string -> t -> 'a option;
497497
}
498498

499-
type 'a maybe_ambiguous = ('a, [ 'a amb_err | `Not_found ]) Result.result
499+
type 'a maybe_ambiguous = ('a, [ 'a amb_err | `Not_found ]) Result.t
500500

501501
let make_scope ?(root = fun _ _ -> None) ?check
502502
(filter : _ -> ([< Component.Element.any ] as 'a) option) : 'a scope =

src/xref2/env.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ type 'a scope constraint 'a = [< Component.Element.any ]
116116
(** Target of a lookup *)
117117

118118
type 'a maybe_ambiguous =
119-
('a, [ `Ambiguous of 'a * 'a list | `Not_found ]) Result.result
119+
('a, [ `Ambiguous of 'a * 'a list | `Not_found ]) Result.t
120120

121121
val lookup_by_name : 'a scope -> string -> t -> 'a maybe_ambiguous
122122
(** Lookup an element in Env depending on the given [scope]. Return

src/xref2/ref_tools.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ type fragment_type_parent_lookup_result =
4040
[ `S of signature_lookup_result | `T of datatype_lookup_result ]
4141

4242
type 'a ref_result =
43-
('a, Errors.Tools_error.reference_lookup_error) Result.result
43+
('a, Errors.Tools_error.reference_lookup_error) Result.t
4444
(** The result type for every functions in this module. *)
4545

4646
let kind_of_find_result = function

0 commit comments

Comments
 (0)