Module Relude_OptionT.WithMonad

Creates an OptionT monad with the given outer Monad

Parameters

Signature

type t('a) =
| OptionT(M.t(option('a)))
;
let make: a. M.t(option('a)) => t('a);
let runOptionT: a. t('a) => M.t(option('a));
let mapOptionT: a b. (M.t(option('a)) => M.t(option('b))) => t('a) => t('b);
let fromOption: a. option('a) => t('a);
let liftF: a. M.t('a) => t('a);
let map: a b. ('a => 'b) => t('a) => t('b);
let subflatMap: a b. ('a => option('b)) => t('a) => t('b);
module Functor: BsBastet.Interface.FUNCTOR with type Functor.t('a) = t('a);
include { ... };
module BsFunctorExtensions: { ... };
let flipMap: Functor.t('a) => ('a => 'b) => Functor.t('b);
let void: Functor.t('a) => Functor.t(unit);
let voidRight: 'a => Functor.t('b) => Functor.t('a);
let voidLeft: Functor.t('a) => 'b => Functor.t('b);
let flap: Functor.t(('a => 'b)) => 'a => Functor.t('b);
let apply: a b. t(('a => 'b)) => t('a) => t('b);
module Apply: BsBastet.Interface.APPLY with type Apply.t('a) = t('a);
include { ... };
module BsApplyExtensions: { ... };
let applyFirst: Apply.t('a) => Apply.t('b) => Apply.t('a);
let applySecond: Apply.t('a) => Apply.t('b) => Apply.t('b);
let map2: ('a => 'b => 'c) => Apply.t('a) => Apply.t('b) => Apply.t('c);
let map3: ('a => 'b => 'c => 'd) => Apply.t('a) => Apply.t('b) => Apply.t('c) => Apply.t('d);
let map4: ('a => 'b => 'c => 'd => 'e) => Apply.t('a) => Apply.t('b) => Apply.t('c) => Apply.t('d) => Apply.t('e);
let map5: ('a => 'b => 'c => 'd => 'e => 'f) => Apply.t('a) => Apply.t('b) => Apply.t('c) => Apply.t('d) => Apply.t('e) => Apply.t('f);
let tuple2: Apply.t('a) => Apply.t('b) => Apply.t(('a, 'b));
let tuple3: Apply.t('a) => Apply.t('b) => Apply.t('c) => Apply.t(('a, 'b, 'c));
let tuple4: Apply.t('a) => Apply.t('b) => Apply.t('c) => Apply.t('d) => Apply.t(('a, 'b, 'c, 'd));
let tuple5: Apply.t('a) => Apply.t('b) => Apply.t('c) => Apply.t('d) => Apply.t('e) => Apply.t(('a, 'b, 'c, 'd, 'e));
let mapTuple2: ('a => 'b => 'c) => (Apply.t('a), Apply.t('b)) => Apply.t('c);
let mapTuple3: ('a => 'b => 'c => 'd) => (Apply.t('a), Apply.t('b), Apply.t('c)) => Apply.t('d);
let mapTuple4: ('a => 'b => 'c => 'd => 'e) => (Apply.t('a), Apply.t('b), Apply.t('c), Apply.t('d)) => Apply.t('e);
let mapTuple5: ('a => 'b => 'c => 'd => 'e => 'f) => (Apply.t('a), Apply.t('b), Apply.t('c), Apply.t('d), Apply.t('e)) => Apply.t('f);
let pure: a. 'a => t('a);
module Applicative: BsBastet.Interface.APPLICATIVE with type Applicative.t('a) = t('a);
include { ... };
module BsApplicativeExtensions: { ... };
let liftA1: ('a => 'b) => Applicative.t('a) => Applicative.t('b);
let when_: bool => Applicative.t(unit) => Applicative.t(unit);
let unless: bool => Applicative.t(unit) => Applicative.t(unit);
let all: list(Applicative.t('a)) => Applicative.t(list('a));
let bind: a b. t('a) => ('a => t('b)) => t('b);
let semiflatMap: a b. ('a => M.t('b)) => t('a) => t('b);
module Monad: BsBastet.Interface.MONAD with type Monad.t('a) = t('a);
include { ... };
module BsMonadExtensions: { ... };
let flatMap: ('a => Monad.t('b)) => Monad.t('a) => Monad.t('b);
let flatten: Monad.t(Monad.t('a)) => Monad.t('a);
let composeKleisli: ('a => Monad.t('b)) => ('b => Monad.t('c)) => 'a => Monad.t('c);
let flipComposeKleisli: ('b => Monad.t('c)) => ('a => Monad.t('b)) => 'a => Monad.t('c);
let liftM1: ('a => 'b) => Monad.t('a) => Monad.t('b);
let when_: Monad.t(bool) => Monad.t(unit) => Monad.t(unit);
let unless: Monad.t(bool) => Monad.t(unit) => Monad.t(unit);
module Infix: { ... };