package async_kernel

  1. Overview
  2. Docs
Monadic concurrency library

Install

Dune Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=01ced973dbc70535f692f38bed524ae82dba17e26e58791b2fbf0d647b160d2e

doc/async_kernel/Async_kernel/Synchronous_time_source/Event/Option/index.html

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.