package mtl

  1. Overview
  2. Docs
type ('r, 'a) m
type ('r, 'a) result = ('r, 'a) m
type ('r, 'a) result_exn = ('a -> 'r) -> 'r
include Monad.S with type ('r, 'a) result := ('r, 'a) result and type ('r, 'a) result_exn := ('r, 'a) result_exn and type ('r, 'a) m := ('r, 'a) m
include Monad.BASE with type ('r, 'a) result := ('r, 'a) result with type ('r, 'a) result_exn := ('r, 'a) result_exn with type ('r, 'a) m := ('r, 'a) m
val unit : 'a -> ('x, 'a) m
val bind : ('x, 'a) m -> ('a -> ('x, 'b) m) -> ('x, 'b) m
val run : ('x, 'a) m -> ('x, 'a) result
val run_exn : ('x, 'a) m -> ('x, 'a) result_exn
val zero : unit -> ('x, 'a) m
val plus : ('x, 'a) m -> ('x, 'a) m -> ('x, 'a) m
val (>>=) : ('x, 'a) m -> ('a -> ('x, 'b) m) -> ('x, 'b) m
val (>>) : ('x, 'a) m -> ('x, 'b) m -> ('x, 'b) m
val join : ('x, ('x, 'a) m) m -> ('x, 'a) m
val apply : ('x, 'a -> 'b) m -> ('x, 'a) m -> ('x, 'b) m
val lift : ('a -> 'b) -> ('x, 'a) m -> ('x, 'b) m
val lift2 : ('a -> 'b -> 'c) -> ('x, 'a) m -> ('x, 'b) m -> ('x, 'c) m
val (>=>) : ('a -> ('x, 'b) m) -> ('b -> ('x, 'c) m) -> 'a -> ('x, 'c) m
val do_when : bool -> ('x, unit) m -> ('x, unit) m
val do_unless : bool -> ('x, unit) m -> ('x, unit) m
val forever : (unit -> ('x, 'a) m) -> ('x, 'b) m
val sequence : ('x, 'a) m list -> ('x, 'a list) m
val sequence_ : ('x, 'a) m list -> ('x, unit) m
val guard : bool -> ('x, unit) m
val sum : ('x, 'a) m list -> ('x, 'a) m
val callcc : (('a -> ('r, 'b) m) -> ('r, 'a) m) -> ('r, 'a) m
val reset : ('a, 'a) m -> ('r, 'a) m
val shift : (('a -> ('q, 'r) m) -> ('r, 'r) m) -> ('r, 'a) m
val abort : 'a -> ('a, 'b) m
val run0 : ('a, 'a) m -> 'a
module T (Wrapped : Monad.S) : sig ... end
OCaml

Innovation. Community. Security.