package core_kernel

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

This module extends Base.Option with bin_io and quickcheck.

type 'a t = 'a Base.Option.t
val bin_t : 'a Bin_prot.Type_class.t -> 'a t Bin_prot.Type_class.t
val bin_read_t : 'a Bin_prot.Read.reader -> 'a t Bin_prot.Read.reader
val __bin_read_t__ : 'a Bin_prot.Read.reader -> (int -> 'a t) Bin_prot.Read.reader
val bin_reader_t : 'a Bin_prot.Type_class.reader -> 'a t Bin_prot.Type_class.reader
val bin_size_t : 'a Bin_prot.Size.sizer -> 'a t Bin_prot.Size.sizer
val bin_write_t : 'a Bin_prot.Write.writer -> 'a t Bin_prot.Write.writer
val bin_writer_t : 'a Bin_prot.Type_class.writer -> 'a t Bin_prot.Type_class.writer
val bin_shape_t : Bin_prot.Shape.t -> Bin_prot.Shape.t
val typerep_of_t : 'a Typerep_lib.Std.Typerep.t -> 'a t Typerep_lib.Std.Typerep.t
val typename_of_t : 'a Typerep_lib.Std.Typename.t -> 'a t Typerep_lib.Std.Typename.t
include module type of struct include Base.Option end with type 'a t := 'a t
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val hash_fold_t : (Base__.Ppx_hash_lib.Std.Hash.state -> 'a -> Base__.Ppx_hash_lib.Std.Hash.state) -> Base__.Ppx_hash_lib.Std.Hash.state -> 'a t -> Base__.Ppx_hash_lib.Std.Hash.state
val t_of_sexp : (Base__.Ppx_sexp_conv_lib.Sexp.t -> 'a) -> Base__.Ppx_sexp_conv_lib.Sexp.t -> 'a t
val sexp_of_t : ('a -> Base__.Ppx_sexp_conv_lib.Sexp.t) -> 'a t -> Base__.Ppx_sexp_conv_lib.Sexp.t
val mem : 'a t -> 'a -> equal:('a -> 'a -> bool) -> bool
val length : 'a t -> int
val is_empty : 'a t -> bool
val iter : 'a t -> f:('a -> unit) -> unit
val fold : 'a t -> init:'accum -> f:('accum -> 'a -> 'accum) -> 'accum
val fold_result : 'a t -> init:'accum -> f:('accum -> 'a -> ('accum, 'e) Base__.Result.t) -> ('accum, 'e) Base__.Result.t
val fold_until : 'a t -> init:'accum -> f:('accum -> 'a -> ('accum, 'final) Base__.Container_intf.Continue_or_stop.t) -> finish:('accum -> 'final) -> 'final
val exists : 'a t -> f:('a -> bool) -> bool
val for_all : 'a t -> f:('a -> bool) -> bool
val count : 'a t -> f:('a -> bool) -> int
val sum : (module Base__.Commutative_group.S with type t = 'sum) -> 'a t -> f:('a -> 'sum) -> 'sum
val find : 'a t -> f:('a -> bool) -> 'a option
val find_map : 'a t -> f:('a -> 'b option) -> 'b option
val to_list : 'a t -> 'a list
val to_array : 'a t -> 'a array
val min_elt : 'a t -> compare:('a -> 'a -> int) -> 'a option
val max_elt : 'a t -> compare:('a -> 'a -> int) -> 'a option
val equal : 'a Base__.Equal.equal -> 'a t Base__.Equal.equal
val invariant : 'a Base__.Invariant_intf.inv -> 'a t Base__.Invariant_intf.inv
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
module Monad_infix = Option.Monad_infix
val bind : 'a t -> f:('a -> 'b t) -> 'b t
val return : 'a -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t
val join : 'a t t -> 'a t
val ignore_m : 'a t -> unit t
val all : 'a t list -> 'a list t
val all_unit : unit t list -> unit t
val all_ignore : unit t list -> unit t
  • deprecated [since 2018-02] Use [all_unit]
module Let_syntax = Option.Let_syntax
val is_none : 'a t -> bool
val is_some : 'a t -> bool
val value_map : 'a t -> default:'b -> f:('a -> 'b) -> 'b
val map2 : 'a t -> 'b t -> f:('a -> 'b -> 'c) -> 'c t
val call : 'a -> f:('a -> unit) t -> unit
val value : 'a t -> default:'a -> 'a
val value_exn : ?here:Base__.Source_code_position0.t -> ?error:Base__.Error.t -> ?message:string -> 'a t -> 'a
val some : 'a -> 'a t
val both : 'a t -> 'b t -> ('a * 'b) t
val first_some : 'a t -> 'a t -> 'a t
val some_if : bool -> 'a -> 'a t
val merge : 'a t -> 'a t -> f:('a -> 'a -> 'a) -> 'a t
val filter : 'a t -> f:('a -> bool) -> 'a t
val try_with : (unit -> 'a) -> 'a t
val validate : none:unit Base__.Validate.check -> some:'a Base__.Validate.check -> 'a t Base__.Validate.check
include Comparator.Derived with type 'a t := 'a t
type 'cmp comparator_witness
val comparator : ('a, 'cmp) Comparator.comparator -> ('a t, 'cmp comparator_witness) Comparator.comparator
OCaml

Innovation. Community. Security.