jon.recoil.org

Module Base.EitherSource

Sourcetype ('f, 's) t =
  1. | First of 'f
  2. | Second of 's
Sourceval compare : ('a -> 'a -> int) -> ('b -> 'b -> int) -> ('a, 'b) Base.Either.t -> ('a, 'b) Base.Either.t -> int
include Sexplib0.Sexpable.S2 with type ('f, 's) t := ('f, 's) Base.Either.t
Sourceval t_of_sexp : (Sexplib0.Sexp.t -> 'a) -> (Sexplib0.Sexp.t -> 'b) -> Sexplib0.Sexp.t -> ('a, 'b) Base.Either.t
Sourceval sexp_of_t : ('a -> Sexplib0.Sexp.t) -> ('b -> Sexplib0.Sexp.t) -> ('a, 'b) Base.Either.t -> Sexplib0.Sexp.t
include Base.Invariant.S2 with type ('a, 'b) t := ('a, 'b) Base.Either.t
Sourceval invariant : ('a -> unit) -> ('b -> unit) -> ('a, 'b) Base.Either.t -> unit
Sourceval swap : ('f, 's) Base.Either.t -> ('s, 'f) Base.Either.t
Sourceval value : ('a, 'a) Base.Either.t -> 'a
Sourceval iter : ('a, 'b) Base.Either.t -> first:('a -> unit) -> second:('b -> unit) -> unit
Sourceval value_map : ('a, 'b) Base.Either.t -> first:('a -> 'c) -> second:('b -> 'c) -> 'c
Sourceval map : ('a, 'b) Base.Either.t -> first:('a -> 'c) -> second:('b -> 'd) -> ('c, 'd) Base.Either.t
Sourceval equal : ('f -> 'f -> bool) -> ('s -> 's -> bool) -> ('f, 's) Base.Either.t -> ('f, 's) Base.Either.t -> bool
Sourceval local_equal : ('f -> 'f -> bool) -> ('s -> 's -> bool) -> ('f, 's) Base.Either.t -> ('f, 's) Base.Either.t -> bool
Sourcemodule type Focused = sig ... end
Sourcemodule First : Base.Either.Focused with type ('a, 'b) t = ('a, 'b) Base.Either.t
Sourcemodule Second : Base.Either.Focused with type ('a, 'b) t = ('b, 'a) Base.Either.t
Sourceval is_first : (_, _) Base.Either.t -> bool
Sourceval is_second : (_, _) Base.Either.t -> bool
Sourceval first : 'f -> ('f, _) Base.Either.t

first and second are First.return and Second.return.

Sourceval second : 's -> (_, 's) Base.Either.t