package core_kernel

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

This module extends Base.Either.

type ('f, 's) t = ('f, 's) Base.Either.t =
  1. | First of 'f
  2. | Second of 's
include Bin_prot.Binable.S2 with type ('f, 's) t := ('f, 's) t
val bin_size_t : ('a, 'b, ('a, 'b) t) Bin_prot.Size.sizer2
val bin_write_t : ('a, 'b, ('a, 'b) t) Bin_prot.Write.writer2
val bin_read_t : ('a, 'b, ('a, 'b) t) Bin_prot.Read.reader2
val __bin_read_t__ : ('a, 'b, int -> ('a, 'b) t) Bin_prot.Read.reader2
val bin_writer_t : ('a, 'b, ('a, 'b) t) Bin_prot.Type_class.S2.writer
val bin_reader_t : ('a, 'b, ('a, 'b) t) Bin_prot.Type_class.S2.reader
val bin_t : ('a, 'b, ('a, 'b) t) Bin_prot.Type_class.S2.t
include module type of struct include Base.Either end with type ('f, 's) t := ('f, 's) t
val compare : ('f -> 'f -> int) -> ('s -> 's -> int) -> ('f, 's) t -> ('f, 's) t -> int
val hash_fold_t : (Base.Hash.state -> 'f -> Base.Hash.state) -> (Base.Hash.state -> 's -> Base.Hash.state) -> Base.Hash.state -> ('f, 's) t -> Base.Hash.state
include Base.Sexpable.S2 with type ('f, 's) t := ('f, 's) t
val t_of_sexp : (Sexplib0.Sexp.t -> 'a) -> (Sexplib0.Sexp.t -> 'b) -> Sexplib0.Sexp.t -> ('a, 'b) t
val sexp_of_t : ('a -> Sexplib0.Sexp.t) -> ('b -> Sexplib0.Sexp.t) -> ('a, 'b) t -> Sexplib0.Sexp.t
include Base.Invariant.S2 with type ('a, 'b) t := ('a, 'b) t
val invariant : ('a -> unit) -> ('b -> unit) -> ('a, 'b) t -> unit
val swap : ('f, 's) t -> ('s, 'f) t
val value : ('a, 'a) t -> 'a
val iter : ('a, 'b) t -> first:('a -> unit) -> second:('b -> unit) -> unit
val value_map : ('a, 'b) t -> first:('a -> 'c) -> second:('b -> 'c) -> 'c
val map : ('a, 'b) t -> first:('a -> 'c) -> second:('b -> 'd) -> ('c, 'd) t
val equal : ('f -> 'f -> bool) -> ('s -> 's -> bool) -> ('f, 's) t -> ('f, 's) t -> bool
module type Focused = sig ... end
module First : Focused with type ('a, 'b) t = ('a, 'b) t
module Second : Focused with type ('a, 'b) t = ('b, 'a) t
val is_first : (_, _) t -> bool
val is_second : (_, _) t -> bool
val first : 'f -> ('f, _) t

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

val second : 's -> (_, 's) t
include Comparator.Derived2 with type ('a, 'b) t := ('a, 'b) t
type ('cmp_a, 'cmp_b) comparator_witness
val comparator : ('a, 'cmp_a) Base.Comparator.comparator -> ('b, 'cmp_b) Base.Comparator.comparator -> (('a, 'b) t, ('cmp_a, 'cmp_b) comparator_witness) Base.Comparator.comparator
include Quickcheckable.S2 with type ('a, 'b) t := ('a, 'b) t
module Stable : sig ... end