File: .lake/packages/lean4/src/lean/lake/Lake/Util/Store.lean

full_name: Lake.MonadStore1Of.store
code: /-- A monad equipped with a dependently typed key-value store for a particular key. -/
class MonadStore1Of {κ : Type u} (k : κ) (α : semiOutParam $ Type v) (m : Type v → Type w) where
  fetch? : m (Option α)
  store : α → m PUnit
goal: α → m PUnit

full_name: Lake.MonadStore1Of
code: /-- A monad equipped with a dependently typed key-value store for a particular key. -/
class MonadStore1Of {κ : Type u} (k : κ) (α : semiOutParam $ Type v) (m : Type v → Type w) where
  fetch? : m (Option α)
  store : α → m PUnit
goal: Type (max v w)

full_name: Lake.MonadStore1Of.fetch?
code: /-- A monad equipped with a dependently typed key-value store for a particular key. -/
class MonadStore1Of {κ : Type u} (k : κ) (α : semiOutParam $ Type v) (m : Type v → Type w) where
  fetch? : m (Option α)
  store : α → m PUnit
goal: m (Option α)

full_name: Lake.MonadStore1
code: /-- Similar to `MonadStore1Of`, but `α` is an `outParam` for convenience. -/
class MonadStore1 {κ : Type u} (k : κ) (α : outParam $ Type v) (m : Type v → Type w) where
  fetch? : m (Option α)
  store : α → m PUnit
goal: Type (max v w)

full_name: Lake.MonadStore1.fetch?
code: /-- Similar to `MonadStore1Of`, but `α` is an `outParam` for convenience. -/
class MonadStore1 {κ : Type u} (k : κ) (α : outParam $ Type v) (m : Type v → Type w) where
  fetch? : m (Option α)
  store : α → m PUnit
goal: m (Option α)

full_name: Lake.MonadStore1.store
code: /-- Similar to `MonadStore1Of`, but `α` is an `outParam` for convenience. -/
class MonadStore1 {κ : Type u} (k : κ) (α : outParam $ Type v) (m : Type v → Type w) where
  fetch? : m (Option α)
  store : α → m PUnit
goal: α → m PUnit

full_name: Lake.instMonadStore1OfMonadStore1Of
code: instance [MonadStore1Of k α m] : MonadStore1 k α m 
goal: {κ : Type u_1} →
  {k : κ} → {α : Type u_2} → {m : Type u_2 → Type u_3} → [inst : Lake.MonadStore1Of k α m] → Lake.MonadStore1 k α m

full_name: Lake.MonadDStore
code: /-- A monad equipped with a dependently typed key-object store. -/
class MonadDStore (κ : Type u) (β : semiOutParam $ κ → Type v) (m : Type v → Type w) where
  fetch? : (key : κ) → m (Option (β key))
  store : (key : κ) → β key → m PUnit
goal: Type (max (max u v) w)

full_name: Lake.MonadDStore.fetch?
code: /-- A monad equipped with a dependently typed key-object store. -/
class MonadDStore (κ : Type u) (β : semiOutParam $ κ → Type v) (m : Type v → Type w) where
  fetch? : (key : κ) → m (Option (β key))
  store : (key : κ) → β key → m PUnit
goal: m (Option (β key))

full_name: Lake.MonadDStore.store
code: /-- A monad equipped with a dependently typed key-object store. -/
class MonadDStore (κ : Type u) (β : semiOutParam $ κ → Type v) (m : Type v → Type w) where
  fetch? : (key : κ) → m (Option (β key))
  store : (key : κ) → β key → m PUnit
goal: β key → m PUnit

full_name: Lake.instMonadStore1OfOfMonadDStore
code: instance [MonadDStore κ β m] : MonadStore1Of k (β k) m 
goal: Lake.MonadStore1Of k (β k) m

full_name: Lake.MonadStore
code: /-- A monad equipped with a key-object store. -/
abbrev MonadStore κ α m 
goal: Type (max (max u_1 u_2) u_3)

full_name: Lake.instMonadDStoreOfMonadLift
code: instance [MonadLift m n] [MonadDStore κ β m] : MonadDStore κ β n 
goal: Lake.MonadDStore κ β n

full_name: Lake.fetchOrCreate
code: @[inline] def fetchOrCreate [Monad m]
(key : κ) [MonadStore1Of key α m] (create : m α) : m α 
goal: m α