package bastet

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

Result is the equivalent of Either in Haskell for Ocaml

val flip : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
val const : 'a -> 'b -> 'a
val result : ('a -> 'c) -> ('b -> 'c) -> ('a, 'b) Stdlib.result -> 'c
module type MAGMA_F = functor (T : Interface.TYPE) -> functor (M : Interface.MAGMA) -> Interface.MAGMA with type t = (M.t, T.t) Stdlib.result
module type MEDIAL_MAGMA_F = functor (T : Interface.TYPE) -> functor (M : Interface.MAGMA) -> Interface.MEDIAL_MAGMA with type t = (M.t, T.t) Stdlib.result
module type SEMIGROUP_F = functor (T : Interface.TYPE) -> functor (S : Interface.SEMIGROUP) -> Interface.SEMIGROUP with type t = (S.t, T.t) Stdlib.result
module type FUNCTOR_F = functor (T : Interface.TYPE) -> Interface.FUNCTOR with type 'a t = ('a, T.t) Stdlib.result
module type APPLY_F = functor (T : Interface.TYPE) -> Interface.APPLY with type 'a t = ('a, T.t) Stdlib.result
module type APPLICATIVE_F = functor (T : Interface.TYPE) -> Interface.APPLICATIVE with type 'a t = ('a, T.t) Stdlib.result
module type MONAD_F = functor (T : Interface.TYPE) -> Interface.MONAD with type 'a t = ('a, T.t) Stdlib.result
module type ALT_F = functor (T : Interface.TYPE) -> Interface.ALT with type 'a t = ('a, T.t) Stdlib.result
module type EXTEND_F = functor (T : Interface.TYPE) -> Interface.EXTEND with type 'a t = ('a, T.t) Stdlib.result
module type SHOW_F = functor (Ok : Interface.SHOW) -> functor (Error : Interface.SHOW) -> Interface.SHOW with type t = (Ok.t, Error.t) Stdlib.result
module type EQ_F = functor (Ok : Interface.EQ) -> functor (Error : Interface.EQ) -> Interface.EQ with type t = (Ok.t, Error.t) Stdlib.result
module type ORD_F = functor (Ok : Interface.ORD) -> functor (Error : Interface.ORD) -> Interface.ORD with type t = (Ok.t, Error.t) Stdlib.result
module type BOUNDED_F = functor (Ok : Interface.BOUNDED) -> functor (Error : Interface.BOUNDED) -> Interface.BOUNDED with type t = (Ok.t, Error.t) Stdlib.result
module type FOLDABLE_F = functor (T : Interface.TYPE) -> Interface.FOLDABLE with type 'a t = ('a, T.t) Stdlib.result
module type TRAVERSABLE_F = functor (T : Interface.TYPE) -> functor (A : Interface.APPLICATIVE) -> Interface.TRAVERSABLE with type 'a t = ('a, T.t) Stdlib.result and type 'a applicative_t = 'a A.t
module type BITRAVERSABLE_F = functor (A : Interface.APPLICATIVE) -> Interface.BITRAVERSABLE with type ('a, 'b) t = ('a, 'b) Stdlib.result and type 'a applicative_t = 'a A.t
module Magma : MAGMA_F
module Bifunctor : Interface.BIFUNCTOR with type ('a, 'b) t = ('a, 'b) Stdlib.result
module Apply : APPLY_F
module Monad : MONAD_F
module Alt : ALT_F
module Extend : EXTEND_F
module Show : SHOW_F
module Eq : EQ_F
module Ord : ORD_F
module Many_Valued_Logic : sig ... end

Many valued logics in general have to relax certain constraints in order to be heyting or boolean algebras, such as:

module Bifoldable : Interface.BIFOLDABLE with type ('a, 'b) t = ('a, 'b) Stdlib.result
module Infix : sig ... end
module Choose (A : Interface.ALT) : sig ... end
module Unsafe : sig ... end
val is_ok : ('a, 'b) Stdlib.result -> bool
val is_error : ('a, 'b) Stdlib.result -> bool
val note : 'err -> 'a option -> ('a, 'err) Stdlib.result
val hush : ('a, 'err) Stdlib.result -> 'a option