package base

  1. Overview
  2. Docs
Full standard library replacement for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

v0.12.2.tar.gz
sha256=0aa8fa8778412c67c38d40e9859bfa5871c4f9c25991f09fea201ae6aaf1d0d9
md5=7150e848a730369a2549d01645fb6c72

doc/base/Base/Field/index.html

Module Base.Field

OCaml record field.

type ('perm, 'record, 'field) t_with_perm =
  1. | Field of ('perm, 'record, 'field) For_generated_code.t

'record is the type of the record. 'field is the type of the values stored in the record field with name name. 'perm is a way of restricting the operations that can be used.

type ('record, 'field) t = ([ `Read | `Set_and_create ], 'record, 'field) t_with_perm

A record field with no restrictions.

type ('record, 'field) readonly_t = ([ `Read ], 'record, 'field) t_with_perm

A record that can only be read, because it belongs to a private type.

val name : (_, _, _) t_with_perm -> string
val get : (_, 'r, 'a) t_with_perm -> 'r -> 'a
val fset : ([> `Set_and_create ], 'r, 'a) t_with_perm -> 'r -> 'a -> 'r
val setter : ([> `Set_and_create ], 'r, 'a) t_with_perm -> ('r -> 'a -> unit) option
val map : ([> `Set_and_create ], 'r, 'a) t_with_perm -> 'r -> f:('a -> 'a) -> 'r
val updater : ([> `Set_and_create ], 'r, 'a) t_with_perm -> ('r -> f:('a -> 'a) -> unit) option
type ('perm, 'record, 'result) user = {
  1. f : 'field. ('perm, 'record, 'field) t_with_perm -> 'result;
}
OCaml

Innovation. Community. Security.