Module Total_map.Make

Parameters

module Key : sig ... end

Signature

include S with module Key = Key
module Key = Key
type comparator_witness
type enumeration_witness
include Ppx_compare_lib.Comparable.S1 with type 'a t := 'a t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
include Ppx_compare_lib.Comparable.S1__local with type 'a t := 'a t
include Ppx_compare_lib.Equal.S1 with type 'a t := 'a t
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
include Ppx_compare_lib.Equal.S1__local with type 'a t := 'a t
include sig ... end
val quickcheck_generator : 'a Core.Quickcheck.Generator.t -> 'a t Core.Quickcheck.Generator.t
val quickcheck_observer : 'a Core.Quickcheck.Observer.t -> 'a t Core.Quickcheck.Observer.t
val quickcheck_shrinker : 'a Core.Quickcheck.Shrinker.t -> 'a t Core.Quickcheck.Shrinker.t
include Core.Applicative with type 'a t := 'a t
val return : 'a 'p 'q. 'a -> 'a t

Convert a value to a t.

val apply : 'a 'b 'p 'q. ('a -> 'b) t -> 'a t -> 'b t

Applies the functions in one t to the values in another. Well-behaved applicatives satisfy these "laws", using <*> as infix apply:

  • return Fn.id <*> t is equivalent to t
  • return Fn.compose <*> tf <*> tg <*> tx is equivalent to tf <*> (tg <*> tx)
  • return f <*> return x is equivalent to return (f x)
  • tf <*> return x is equivalent to return (fun f -> f x) <*> tf
val both : 'a 'b 'p 'q. 'a t -> 'b t -> ('a * 'b) t

Combines values in two ts as tuples. Using <*> as infix apply, equivalent to return (fun a b -> a, b) <*> ta <*> tb.

val map : 'a 'b 'p 'q. 'a t -> f:('a -> 'b) -> 'b t

Transforms the contents of a t. Using <*> as infix apply, equivalent to return f <*> t.

val map2 : 'a 'b 'c 'p 'q. 'a t -> 'b t -> f:('a -> 'b -> 'c) -> 'c t

Combines the contents of two ts. Using <*> as infix apply, equivalent to return f <*> ta <*> tb.

val map3 : 'a 'b 'c 'd 'p 'q. 'a t -> 'b t -> 'c t -> f:('a -> 'b -> 'c -> 'd) -> 'd t

Combines the contents of three ts. Using <*> as infix apply, equivalent to return f <*> ta <*> tb <*> tc.

val all : 'a 'p 'q. 'a t list -> 'a list t

Combines a list of t.

val all_unit : 'p 'q. unit t list -> unit t

Combines a list of t whose contents are unimportant.

val (<*>) : 'a 'b 'p 'q. ('a -> 'b) t -> 'a t -> 'b t
val (<*) : 'a 'p 'q. 'a t -> unit t -> 'a t
val (*>) : 'a 'p 'q. unit t -> 'a t -> 'a t
val (>>|) : 'a 'b 'p 'q. 'a t -> ('a -> 'b) -> 'b t
module Applicative_infix : sig ... end
val create : (Key.t -> 'a) @ local -> 'a t
val create_const : 'a -> 'a t
val of_map_exn : (Key.t, 'a, comparator_witness) Core.Map.t -> 'a t
val of_alist_exn : (Key.t * 'a) list -> 'a t
val of_alist_multi_exn : (Key.t * 'a) list -> 'a list t
val of_alist_multi : (Key.t * 'a) list -> 'a list t

Note that of_alist_multi keylist will contain empty list items if a given Key.t is not present in keylist

include Core.Sexpable.S1 with type 'a t := 'a t
val t_of_sexp : 'a. (Sexplib0.Sexp.t -> 'a) -> Sexplib0.Sexp.t -> 'a t
val sexp_of_t : 'a. ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.t
include Core.Binable.S1 with type 'a t := 'a t
val bin_shape_t : Bin_prot.Shape.t -> Bin_prot.Shape.t
include sig ... end
val bin_size_t : 'a. ('a, 'a t) Bin_prot.Size.sizer1
val bin_write_t : 'a. ('a, 'a t) Bin_prot.Write.writer1
val bin_read_t : 'a. ('a, 'a t) Bin_prot.Read.reader1
val __bin_read_t__ : 'a. ('a, 'a t) Bin_prot.Read.vtag_reader1
val bin_writer_t : 'a. ('a, 'a t) Bin_prot.Type_class.S1.writer
val bin_reader_t : 'a. ('a, 'a t) Bin_prot.Type_class.S1.reader
val bin_t : 'a. ('a, 'a t) Bin_prot.Type_class.S1.t