package accessor

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type ('a, +'x, 'y) t

An (a, x, y) t is an applicative for defining many accessors. See the documentation of Accessor.many for more information.

A value of type (a, x, y) t can make the following claim: I can give you some number of xes and if you tell me how to replace each of them with a y, I will also give you an a.

module Accessed : Base.Monad.S_indexed with type ('x, 'a, 'y) t := ('a, 'x, 'y) t

The same as S except the monad type has three arguments. The second and third are composed across all computation.

val access : 'a -> ('b, 'a, 'b) t

access a "accesses" a and returns the value you are expected replace it with.

val of_nonempty : ('a, 'x, 'y) Nonempty.t -> ('a, 'x, 'y) t
module Of_applicative (A : sig ... end) : sig ... end
module Of_applicative2 (A : sig ... end) : sig ... end
module Of_applicative3 (A : sig ... end) : sig ... end
module Open_on_rhs_intf : sig ... end
include Base.Applicative.S3 with type ('a, 'b, 'c) t := ('a, 'b, 'c) t
val return : 'a -> ('a, _, _) t
val map : ('a, 'd, 'e) t -> f:('a -> 'b) -> ('b, 'd, 'e) t
val both : ('a, 'd, 'e) t -> ('b, 'd, 'e) t -> ('a * 'b, 'd, 'e) t
val (<*>) : ('a -> 'b, 'd, 'e) t -> ('a, 'd, 'e) t -> ('b, 'd, 'e) t
val (<*) : ('a, 'd, 'e) t -> (unit, 'd, 'e) t -> ('a, 'd, 'e) t
val (*>) : (unit, 'd, 'e) t -> ('a, 'd, 'e) t -> ('a, 'd, 'e) t
val (>>|) : ('a, 'd, 'e) t -> ('a -> 'b) -> ('b, 'd, 'e) t
val apply : ('a -> 'b, 'd, 'e) t -> ('a, 'd, 'e) t -> ('b, 'd, 'e) t
val map2 : ('a, 'd, 'e) t -> ('b, 'd, 'e) t -> f:('a -> 'b -> 'c) -> ('c, 'd, 'e) t
val map3 : ('a, 'd, 'e) t -> ('b, 'd, 'e) t -> ('c, 'd, 'e) t -> f:('a -> 'b -> 'c -> 'result) -> ('result, 'd, 'e) t
val all : ('a, 'd, 'e) t list -> ('a list, 'd, 'e) t
val all_unit : (unit, 'd, 'e) t list -> (unit, 'd, 'e) t
module Applicative_infix : sig ... end
include Base.Applicative.Let_syntax3 with type ('a, 'b, 'c) t := ('a, 'b, 'c) t with module Open_on_rhs_intf := Open_on_rhs_intf
val access_many : (Base.unit -> 'a -> 'b, Base.unit -> 'at -> 'bt, [> Subtyping.many ]) General.t -> 'at -> ('bt, 'a, 'b) t

Access everything that the given accessor accesses.

module Let_syntax : sig ... end
module Accessor : sig ... end
module Make_access (T : sig ... end) : sig ... end
module Make_access3 (T : sig ... end) : sig ... end
module Make_access4 (T : sig ... end) : sig ... end
OCaml

Innovation. Community. Security.