File: .lake/packages/lean4/src/lean/Init/Control/Except.lean

full_name: Except.pure
code: @[always_inline, inline]
protected def pure (a : α) : Except ε α 
goal: Except ε α

full_name: Except.map
code: @[always_inline, inline]
protected def map (f : α → β) : Except ε α → Except ε β
  
goal: Except ε α → Except ε β

full_name: Except.map_id
code: @[simp] theorem map_id : Except.map (ε := ε) (α := α) (β := α) id = id 
goal: Except.map id = id

full_name: Except.mapError
code: @[always_inline, inline]
protected def mapError (f : ε → ε') : Except ε α → Except ε' α
  
goal: Except ε α → Except ε' α

full_name: Except.bind
code: @[always_inline, inline]
protected def bind (ma : Except ε α) (f : α → Except ε β) : Except ε β 
goal: Except ε β

full_name: Except.toBool
code: /-- Returns true if the value is `Except.ok`, false otherwise. -/
@[always_inline, inline]
protected def toBool : Except ε α → Bool
  
goal: Except ε α → Bool

full_name: Except.isOk
code: abbrev isOk : Except ε α → Bool 
goal: Except ε α → Bool

full_name: Except.toOption
code: @[always_inline, inline]
protected def toOption : Except ε α → Option α
  
goal: Except ε α → Option α

full_name: Except.tryCatch
code: @[always_inline, inline]
protected def tryCatch (ma : Except ε α) (handle : ε → Except ε α) : Except ε α 
goal: Except ε α

full_name: Except.orElseLazy
code: def orElseLazy (x : Except ε α) (y : Unit → Except ε α) : Except ε α 
goal: Except ε α

full_name: Except.«instMonad_.lake»
code: @[always_inline]
instance : Monad (Except ε) 
goal: Monad (Except ε)

full_name: ExceptT
code: def ExceptT (ε : Type u) (m : Type u → Type v) (α : Type u) : Type v 
goal: Type v

full_name: ExceptT.mk
code: @[always_inline, inline]
def ExceptT.mk {ε : Type u} {m : Type u → Type v} {α : Type u} (x : m (Except ε α)) : ExceptT ε m α 
goal: ExceptT ε m α

full_name: ExceptT.run
code: @[always_inline, inline]
def ExceptT.run {ε : Type u} {m : Type u → Type v} {α : Type u} (x : ExceptT ε m α) : m (Except ε α) 
goal: m (Except ε α)

full_name: ExceptT.pure
code: @[always_inline, inline]
protected def pure {α : Type u} (a : α) : ExceptT ε m α 
goal: ExceptT ε m α

full_name: ExceptT.bindCont
code: @[always_inline, inline]
protected def bindCont {α β : Type u} (f : α → ExceptT ε m β) : Except ε α → m (Except ε β)
  
goal: Except ε α → m (Except ε β)

full_name: ExceptT.bind
code: @[always_inline, inline]
protected def bind {α β : Type u} (ma : ExceptT ε m α) (f : α → ExceptT ε m β) : ExceptT ε m β 
goal: ExceptT ε m β

full_name: ExceptT.map
code: @[always_inline, inline]
protected def map {α β : Type u} (f : α → β) (x : ExceptT ε m α) : ExceptT ε m β 
goal: ExceptT ε m β

full_name: ExceptT.lift
code: @[always_inline, inline]
protected def lift {α : Type u} (t : m α) : ExceptT ε m α 
goal: ExceptT ε m α

full_name: ExceptT.instMonadLiftExcept
code: @[always_inline]
instance : MonadLift (Except ε) (ExceptT ε m) 
goal: MonadLift (Except ε) (ExceptT ε m)

full_name: ExceptT.instMonadLift
code: instance : MonadLift m (ExceptT ε m) 
goal: MonadLift m (ExceptT ε m)

full_name: ExceptT.tryCatch
code: @[always_inline, inline]
protected def tryCatch {α : Type u} (ma : ExceptT ε m α) (handle : ε → ExceptT ε m α) : ExceptT ε m α 
goal: ExceptT ε m α

full_name: ExceptT.instMonadFunctor
code: instance : MonadFunctor m (ExceptT ε m) 
goal: MonadFunctor m (ExceptT ε m)

full_name: ExceptT.instMonad
code: @[always_inline]
instance : Monad (ExceptT ε m) 
goal: Monad (ExceptT ε m)

full_name: ExceptT.adapt
code: @[always_inline, inline]
protected def adapt {ε' α : Type u} (f : ε → ε') : ExceptT ε m α → ExceptT ε' m α 
goal: ExceptT ε m α → ExceptT ε' m α

full_name: instMonadExceptOfExceptT
code: @[always_inline]
instance (m : Type u → Type v) (ε₁ : Type u) (ε₂ : Type u) [MonadExceptOf ε₁ m] : MonadExceptOf ε₁ (ExceptT ε₂ m) 
goal: MonadExceptOf ε₁ (ExceptT ε₂ m)

full_name: instMonadExceptOfExceptTOfMonad
code: @[always_inline]
instance (m : Type u → Type v) (ε : Type u) [Monad m] : MonadExceptOf ε (ExceptT ε m) 
goal: MonadExceptOf ε (ExceptT ε m)

full_name: instInhabitedExceptTOfMonad
code: instance [Monad m] [Inhabited ε] : Inhabited (ExceptT ε m α) 
goal: Inhabited (ExceptT ε m α)

full_name: «instMonadExceptOfExcept_.lake»
code: instance (ε) : MonadExceptOf ε (Except ε) 
goal: MonadExceptOf ε (Except ε)

full_name: MonadExcept.orelse'
code: /-- Alternative orelse operator that allows to select which exception should be used.
    The default is to use the first exception since the standard `orelse` uses the second. -/
@[always_inline, inline]
def orelse' [MonadExcept ε m] {α : Type v} (t₁ t₂ : m α) (useFirstEx := true) : m α 
goal: m α

full_name: observing
code: @[always_inline, inline]
def observing {ε α : Type u} {m : Type u → Type v} [Monad m] [MonadExcept ε m] (x : m α) : m (Except ε α) 
goal: m (Except ε α)

full_name: liftExcept
code: def liftExcept [MonadExceptOf ε m] [Pure m] : Except ε α → m α
  
goal: Except ε α → m α

full_name: instMonadControlExceptTOfMonad
code: instance (ε : Type u) (m : Type u → Type v) [Monad m] : MonadControl m (ExceptT ε m) 
goal: MonadControl m (ExceptT ε m)

full_name: MonadFinally
code: class MonadFinally (m : Type u → Type v) where
  /-- `tryFinally' x f` runs `x` and then the "finally" computation `f`.
  When `x` succeeds with `a : α`, `f (some a)` is returned. If `x` fails
  for `m`'s definition of failure, `f none` is returned. Hence `tryFinally'`
  can be thought of as performing the same role as a `finally` block in
  an imperative programming language. -/
  tryFinally' {α β} : m α → (Option α → m β) → m (α × β)
goal: Type (max (u + 1) v)

full_name: MonadFinally.tryFinally'
code: class MonadFinally (m : Type u → Type v) where
  /-- `tryFinally' x f` runs `x` and then the "finally" computation `f`.
  When `x` succeeds with `a : α`, `f (some a)` is returned. If `x` fails
  for `m`'s definition of failure, `f none` is returned. Hence `tryFinally'`
  can be thought of as performing the same role as a `finally` block in
  an imperative programming language. -/
  tryFinally' {α β} : m α → (Option α → m β) → m (α × β)
goal: m α → (Option α → m β) → m (α × β)

full_name: tryFinally
code: /-- Execute `x` and then execute `finalizer` even if `x` threw an exception -/
@[always_inline, inline]
def tryFinally {m : Type u → Type v} {α β : Type u} [MonadFinally m] [Functor m] (x : m α) (finalizer : m β) : m α 
goal: m α

full_name: Id.finally
code: @[always_inline]
instance Id.finally : MonadFinally Id 
goal: MonadFinally Id

full_name: ExceptT.finally
code: @[always_inline]
instance ExceptT.finally {m : Type u → Type v} {ε : Type u} [MonadFinally m] [Monad m] : MonadFinally (ExceptT ε m) 
goal: MonadFinally (ExceptT ε m)