@[protected]
Equations
- option_t.bind_cont f (some a) = (f a).run
- option_t.bind_cont f none = pure none
@[protected]
@[protected, instance]
Equations
@[protected]
def
option_t.orelse
{m : Type u → Type v}
[monad m]
{α : Type u}
(ma mb : option_t m α) :
option_t m α
@[protected]
Equations
- option_t.of_option o = {run := pure o}
@[protected, instance]
Equations
- option_t.alternative = {to_applicative := monad.to_applicative option_t.monad, to_has_orelse := {orelse := option_t.orelse _inst_1}, failure := option_t.fail _inst_1}
@[protected]
@[protected, instance]
Equations
- option_t.has_monad_lift = {monad_lift := option_t.lift _inst_1}
@[protected, instance]
def
option_t.monad_functor
{m : Type u → Type v}
[monad m]
(m' : Type u → Type v)
[monad m'] :
monad_functor m m' (option_t m) (option_t m')
Equations
- option_t.monad_functor m' = {monad_map := λ (α : Type u), option_t.monad_map}
@[protected, instance]
Equations
- option_t.monad_except = {throw := λ (_x : Type u) (_x_1 : unit), option_t.fail, catch := option_t.catch _inst_1}
@[protected, instance]
def
option_t.monad_run
(m : Type u_1 → Type u_2)
(out : out_param (Type u_1 → Type u_2))
[monad_run out m] :
Equations
- option_t.monad_run m out = {run := λ (α : Type u_1), run ∘ option_t.run}