package links

  1. Overview
  2. Docs
type t =
  1. | ConcreteLens of Sort.t
    (*

    A statically fully checked lens.

    *)
  2. | AbstractLens of {
    1. checked : bool;
    2. sort : Sort.t;
    }
    (*

    The type of a lens where not all checks have been performed. The predicate value is a dummy value (None) and not the actual predicate.

    *)
val pp : Ppx_deriving_runtime.Format.formatter -> t -> Ppx_deriving_runtime.unit
val sort : t -> Sort.t

Get the sort of the lens.

val equal : t -> t -> bool
val type_lens_fun_dep : fds:(string list * string list) list -> columns:Column.List.t -> (t, Sort.Lens_sort_error.t) Stdlib.result
val set_serial : t -> columns:Alias.Set.t -> t

Change the specified columns to be of serial type.

module Select_lens_error : sig ... end
val type_select_lens : t -> predicate:('a * 'a Links_lens__.Phrase_sugar.t) -> (t, 'a Select_lens_error.t) Stdlib.result
val type_select_lens_dynamic : t -> (t, 'a Select_lens_error.t) Stdlib.result
module Drop_lens_error : sig ... end
val type_drop_lens : t -> drop:Alias.t list -> default:Links_lens__.Phrase_type.t list -> key:Alias.Set.t -> (t, Drop_lens_error.t) Stdlib.result
module Join_lens_error : sig ... end
val type_join_lens : t -> t -> on:(string * string * string) list -> del_left:('a * 'a Links_lens__.Phrase_sugar.t) -> del_right:('a * 'a Links_lens__.Phrase_sugar.t) -> (t, 'a Join_lens_error.t) Stdlib.result
val record_type : t -> Links_lens__.Phrase_type.t
module Unchecked_lens_error : sig ... end
val is_abstract : t -> bool

Returns true if the lens is an abstract lens.

val is_checked : t -> bool

Returns true if an abstract lens has been checked or the lens is a concrete lens.

val ensure_checked : t -> (unit, Unchecked_lens_error.t) Stdlib.result

Ensures that an abstract lens type has explicitly been checked.

val make_checked : t -> t

Set an abstract lens as explicitly checked.

OCaml

Innovation. Community. Security.