package async_kernel

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

Module Event.OptionSource

type value := t
Sourcetype t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t

Constructors analogous to None and Some. If not (some_is_representable x) then some x may raise or return none.

Sourceval none : t
Sourceval some : value -> t
Sourceval is_none : t -> bool
Sourceval is_some : t -> bool
Sourceval value : t -> default:value -> value

value (some x) ~default = x and value none ~default = default.

Sourceval value_exn : t -> value

value_exn (some x) = x. value_exn none raises. Unlike Option.value_exn, there is no ?message argument, so that calls to value_exn that do not raise also do not have to allocate.

Sourceval to_option : t -> value option
Sourceval of_option : value option -> t
Sourcemodule Optional_syntax : Core.Optional_syntax.S with type t := t with type value := value
OCaml

Innovation. Community. Security.