package batteries

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type (!'a, !'b) t = ('a, 'b) BatPervasives.result =
  1. | Ok of 'a
  2. | Bad of 'b
val catch : ('a -> 'b) -> 'a -> ('b, exn) t
val catch2 : ('a -> 'b -> 'c) -> 'a -> 'b -> ('c, exn) t
val catch3 : ('a -> 'b -> 'c -> 'd) -> 'a -> 'b -> 'c -> ('d, exn) t
val get : ('a, exn) t -> 'a
val default : 'a -> ('a, 'b) t -> 'a
val map_default : 'b -> ('a -> 'b) -> ('a, 'c) t -> 'b
val is_ok : ('a, 'b) t -> bool
val is_bad : ('a, 'b) t -> bool
val is_exn : exn -> ('a, exn) t -> bool
val of_option : 'a option -> ('a, unit) t
val to_option : ('a, 'b) t -> 'a option
module Monad : sig ... end
module Infix : sig ... end
val print : ('b BatInnerIO.output -> 'a -> unit) -> 'b BatInnerIO.output -> ('a, exn) t -> unit
OCaml

Innovation. Community. Security.