package ocaml-basics

  1. Overview
  2. Docs
module Accu : OBMonoid.S
module Monad : OBMonad.S2 with type ('ok, 'err) t = ('ok, 'err) Stdlib.result
module Applicative : OBApplicative.S2 with type ('ok, 'err) t = ('ok, 'err) Stdlib.result
type ('ok, 'err) t = ('ok, 'err) Stdlib.result =
  1. | Ok of 'ok
  2. | Error of 'err
include Sexplib0.Sexpable.S2 with type ('ok, 'err) t := ('ok, 'err) t
val t_of_sexp : (Sexplib0__.Sexp.t -> 'a) -> (Sexplib0__.Sexp.t -> 'b) -> Sexplib0__.Sexp.t -> ('a, 'b) t
val sexp_of_t : ('a -> Sexplib0__.Sexp.t) -> ('b -> Sexplib0__.Sexp.t) -> ('a, 'b) t -> Sexplib0__.Sexp.t
include module type of Monad.Core
include OBMonad.Kernel2 with type ('a, 'b) t := ('a, 'b) Monad.t
val bind : ('a, 'b) Monad.t -> ('a -> ('c, 'b) Monad.t) -> ('c, 'b) Monad.t
val return : 'a -> ('a, _) Monad.t
include module type of Applicative.Core
val apply : ('a -> 'b, 'c) Applicative.t -> ('a, 'c) Applicative.t -> ('b, 'c) Applicative.t
val map : ('a -> 'b) -> ('a, 'c) Applicative.t -> ('b, 'c) Applicative.t
val pure : 'a -> ('a, _) Applicative.t
include OBTraversable.S2 with type ('a, 'b) t := ('a, 'b) t
val traverse : ('a -> ('b, 'c) t) -> 'a list -> ('b list, 'c) t
val sequence : ('a, 'b) t list -> ('a list, 'b) t
val choose : ('ok, 'err Accu.t) t -> ('ok, 'err Accu.t) t -> ('ok, 'err Accu.t) t
val get_ok : default:'a -> ('a, _) t -> 'a
module Infix : sig ... end
OCaml

Innovation. Community. Security.