File: .lake/packages/lean4/src/lean/Lean/ScopedEnvExtension.lean

full_name: Lean.ScopedEnvExtension.Entry.global
code: inductive Entry (α : Type) where
  | global : α → Entry α
  | scoped : Name → α → Entry α
goal: α → Lean.ScopedEnvExtension.Entry α

full_name: Lean.ScopedEnvExtension.Entry.scoped
code: inductive Entry (α : Type) where
  | global : α → Entry α
  | scoped : Name → α → Entry α
goal: Lean.Name → α → Lean.ScopedEnvExtension.Entry α

full_name: Lean.ScopedEnvExtension.Entry
code: inductive Entry (α : Type) where
  | global : α → Entry α
  | scoped : Name → α → Entry α
goal: Type

full_name: Lean.ScopedEnvExtension.State.activeScopes
code: structure State (σ : Type) where
  state        : σ
  activeScopes : NameSet := {}
goal: Lean.NameSet

full_name: Lean.ScopedEnvExtension.State
code: structure State (σ : Type) where
  state        : σ
  activeScopes : NameSet := {}
goal: Type

full_name: Lean.ScopedEnvExtension.State.state
code: structure State (σ : Type) where
  state        : σ
  activeScopes : NameSet := {}
goal: σ

full_name: Lean.ScopedEnvExtension.instInhabitedScopedEntries
code: structure ScopedEntries (β : Type) where
  map : SMap Name (PArray β) := {}
  deriving Inhabited
goal: {a : Type} → Inhabited (Lean.ScopedEnvExtension.ScopedEntries a)

full_name: Lean.ScopedEnvExtension.ScopedEntries.map
code: structure ScopedEntries (β : Type) where
  map : SMap Name (PArray β) := {}
  deriving Inhabited
goal: Lean.SMap Lean.Name (Lean.PArray β)

full_name: Lean.ScopedEnvExtension.ScopedEntries
code: structure ScopedEntries (β : Type) where
  map : SMap Name (PArray β) := {}
  deriving Inhabited
goal: Type

full_name: Lean.ScopedEnvExtension.instInhabitedStateStack
code: structure StateStack (α : Type) (β : Type) (σ : Type) where
  stateStack    : List (State σ) := {}
  scopedEntries : ScopedEntries β := {}
  newEntries    : List (Entry α) := []
  deriving Inhabited
goal: {a a_1 a_2 : Type} → Inhabited (Lean.ScopedEnvExtension.StateStack a a_1 a_2)

full_name: Lean.ScopedEnvExtension.StateStack
code: structure StateStack (α : Type) (β : Type) (σ : Type) where
  stateStack    : List (State σ) := {}
  scopedEntries : ScopedEntries β := {}
  newEntries    : List (Entry α) := []
  deriving Inhabited
goal: Type

full_name: Lean.ScopedEnvExtension.StateStack.newEntries
code: structure StateStack (α : Type) (β : Type) (σ : Type) where
  stateStack    : List (State σ) := {}
  scopedEntries : ScopedEntries β := {}
  newEntries    : List (Entry α) := []
  deriving Inhabited
goal: List (Lean.ScopedEnvExtension.Entry α)

full_name: Lean.ScopedEnvExtension.StateStack.scopedEntries
code: structure StateStack (α : Type) (β : Type) (σ : Type) where
  stateStack    : List (State σ) := {}
  scopedEntries : ScopedEntries β := {}
  newEntries    : List (Entry α) := []
  deriving Inhabited
goal: Lean.ScopedEnvExtension.ScopedEntries β

full_name: Lean.ScopedEnvExtension.StateStack.stateStack
code: structure StateStack (α : Type) (β : Type) (σ : Type) where
  stateStack    : List (State σ) := {}
  scopedEntries : ScopedEntries β := {}
  newEntries    : List (Entry α) := []
  deriving Inhabited
goal: List (Lean.ScopedEnvExtension.State σ)

full_name: Lean.ScopedEnvExtension.Descr.mkInitial
code: structure Descr (α : Type) (β : Type) (σ : Type) where
  name           : Name := by exact decl_name%
  mkInitial      : IO σ
  ofOLeanEntry   : σ → α → ImportM β
  toOLeanEntry   : β → α
  addEntry       : σ → β → σ
  finalizeImport : σ → σ := id
goal: IO σ

full_name: Lean.ScopedEnvExtension.Descr
code: structure Descr (α : Type) (β : Type) (σ : Type) where
  name           : Name := by exact decl_name%
  mkInitial      : IO σ
  ofOLeanEntry   : σ → α → ImportM β
  toOLeanEntry   : β → α
  addEntry       : σ → β → σ
  finalizeImport : σ → σ := id
goal: Type

full_name: Lean.ScopedEnvExtension.Descr.ofOLeanEntry
code: structure Descr (α : Type) (β : Type) (σ : Type) where
  name           : Name := by exact decl_name%
  mkInitial      : IO σ
  ofOLeanEntry   : σ → α → ImportM β
  toOLeanEntry   : β → α
  addEntry       : σ → β → σ
  finalizeImport : σ → σ := id
goal: σ → α → Lean.ImportM β

full_name: Lean.ScopedEnvExtension.Descr.toOLeanEntry
code: structure Descr (α : Type) (β : Type) (σ : Type) where
  name           : Name := by exact decl_name%
  mkInitial      : IO σ
  ofOLeanEntry   : σ → α → ImportM β
  toOLeanEntry   : β → α
  addEntry       : σ → β → σ
  finalizeImport : σ → σ := id
goal: β → α

full_name: Lean.ScopedEnvExtension.Descr.addEntry
code: structure Descr (α : Type) (β : Type) (σ : Type) where
  name           : Name := by exact decl_name%
  mkInitial      : IO σ
  ofOLeanEntry   : σ → α → ImportM β
  toOLeanEntry   : β → α
  addEntry       : σ → β → σ
  finalizeImport : σ → σ := id
goal: σ → β → σ

full_name: Lean.ScopedEnvExtension.Descr.name
code: structure Descr (α : Type) (β : Type) (σ : Type) where
  name           : Name := by exact decl_name%
  mkInitial      : IO σ
  ofOLeanEntry   : σ → α → ImportM β
  toOLeanEntry   : β → α
  addEntry       : σ → β → σ
  finalizeImport : σ → σ := id
goal: Lean.Name

full_name: Lean.ScopedEnvExtension.Descr.finalizeImport
code: structure Descr (α : Type) (β : Type) (σ : Type) where
  name           : Name := by exact decl_name%
  mkInitial      : IO σ
  ofOLeanEntry   : σ → α → ImportM β
  toOLeanEntry   : β → α
  addEntry       : σ → β → σ
  finalizeImport : σ → σ := id
goal: σ → σ

full_name: Lean.ScopedEnvExtension.instInhabitedDescr
code: instance [Inhabited α] : Inhabited (Descr α β σ) 
goal: Inhabited (Lean.ScopedEnvExtension.Descr α β σ)

full_name: Lean.ScopedEnvExtension.mkInitial
code: def mkInitial (descr : Descr α β σ) : IO (StateStack α β σ) 
goal: IO (Lean.ScopedEnvExtension.StateStack α β σ)

full_name: Lean.ScopedEnvExtension.ScopedEntries.insert
code: def ScopedEntries.insert (scopedEntries : ScopedEntries β) (ns : Name) (b : β) : ScopedEntries β 
goal: Lean.ScopedEnvExtension.ScopedEntries β

full_name: Lean.ScopedEnvExtension.addImportedFn
code: def addImportedFn (descr : Descr α β σ) (as : Array (Array (Entry α))) : ImportM (StateStack α β σ) 
goal: Lean.ImportM (Lean.ScopedEnvExtension.StateStack α β σ)

full_name: Lean.ScopedEnvExtension.addEntryFn
code: def addEntryFn (descr : Descr α β σ) (s : StateStack α β σ) (e : Entry β) : StateStack α β σ 
goal: Lean.ScopedEnvExtension.StateStack α β σ

full_name: Lean.ScopedEnvExtension.exportEntriesFn
code: def exportEntriesFn (s : StateStack α β σ) : Array (Entry α) 
goal: Array (Lean.ScopedEnvExtension.Entry α)

full_name: Lean.ScopedEnvExtension.descr
code: structure ScopedEnvExtension (α : Type) (β : Type) (σ : Type) where
  descr : Descr α β σ
  ext   : PersistentEnvExtension (Entry α) (Entry β) (StateStack α β σ)
  deriving Inhabited
goal: Lean.ScopedEnvExtension.Descr α β σ

full_name: Lean.ScopedEnvExtension.ext
code: structure ScopedEnvExtension (α : Type) (β : Type) (σ : Type) where
  descr : Descr α β σ
  ext   : PersistentEnvExtension (Entry α) (Entry β) (StateStack α β σ)
  deriving Inhabited
goal: Lean.PersistentEnvExtension (Lean.ScopedEnvExtension.Entry α) (Lean.ScopedEnvExtension.Entry β)
  (Lean.ScopedEnvExtension.StateStack α β σ)

full_name: Lean.ScopedEnvExtension
code: structure ScopedEnvExtension (α : Type) (β : Type) (σ : Type) where
  descr : Descr α β σ
  ext   : PersistentEnvExtension (Entry α) (Entry β) (StateStack α β σ)
  deriving Inhabited
goal: Type

full_name: Lean.instInhabitedScopedEnvExtension
code: structure ScopedEnvExtension (α : Type) (β : Type) (σ : Type) where
  descr : Descr α β σ
  ext   : PersistentEnvExtension (Entry α) (Entry β) (StateStack α β σ)
  deriving Inhabited
goal: {a : Type} → [inst : Inhabited a] → {a_1 a_2 : Type} → Inhabited (Lean.ScopedEnvExtension a a_1 a_2)

full_name: Lean.scopedEnvExtensionsRef
code: builtin_initialize scopedEnvExtensionsRef : IO.Ref (Array (ScopedEnvExtension EnvExtensionEntry EnvExtensionEntry EnvExtensionState)) ← IO.mkRef #[]
goal: IO.Ref (Array (Lean.ScopedEnvExtension Lean.EnvExtensionEntry Lean.EnvExtensionEntry Lean.EnvExtensionState))

full_name: Lean.initFn._@..lake.packages.lean4.src.lean.Lean.ScopedEnvExtension._hyg.1024
code: builtin_initialize scopedEnvExtensionsRef : IO.Ref (Array (ScopedEnvExtension EnvExtensionEntry EnvExtensionEntry EnvExtensionState)) ← IO.mkRef #[]
goal: IO (IO.Ref (Array (Lean.ScopedEnvExtension Lean.EnvExtensionEntry Lean.EnvExtensionEntry Lean.EnvExtensionState)))

full_name: Lean.registerScopedEnvExtensionUnsafe
code: unsafe def registerScopedEnvExtensionUnsafe (descr : Descr α β σ) : IO (ScopedEnvExtension α β σ) 
goal: IO (Lean.ScopedEnvExtension α β σ)

full_name: Lean.registerScopedEnvExtension
code: @[implemented_by registerScopedEnvExtensionUnsafe]
opaque registerScopedEnvExtension (descr : Descr α β σ) : IO (ScopedEnvExtension α β σ)
goal: IO (Lean.ScopedEnvExtension α β σ)

full_name: Lean.ScopedEnvExtension.pushScope
code: def ScopedEnvExtension.pushScope (ext : ScopedEnvExtension α β σ) (env : Environment) : Environment 
goal: Lean.Environment

full_name: Lean.ScopedEnvExtension.popScope
code: def ScopedEnvExtension.popScope (ext : ScopedEnvExtension α β σ) (env : Environment) : Environment 
goal: Lean.Environment

full_name: Lean.ScopedEnvExtension.addEntry
code: def ScopedEnvExtension.addEntry (ext : ScopedEnvExtension α β σ) (env : Environment) (b : β) : Environment 
goal: Lean.Environment

full_name: Lean.ScopedEnvExtension.addScopedEntry
code: def ScopedEnvExtension.addScopedEntry (ext : ScopedEnvExtension α β σ) (env : Environment) (namespaceName : Name) (b : β) : Environment 
goal: Lean.Environment

full_name: Lean.ScopedEnvExtension.addLocalEntry
code: def ScopedEnvExtension.addLocalEntry (ext : ScopedEnvExtension α β σ) (env : Environment) (b : β) : Environment 
goal: Lean.Environment

full_name: Lean.ScopedEnvExtension.addCore
code: def ScopedEnvExtension.addCore (env : Environment) (ext : ScopedEnvExtension α β σ) (b : β) (kind : AttributeKind) (namespaceName : Name) : Environment 
goal: Lean.Environment

full_name: Lean.ScopedEnvExtension.add
code: def ScopedEnvExtension.add [Monad m] [MonadResolveName m] [MonadEnv m] (ext : ScopedEnvExtension α β σ) (b : β) (kind := AttributeKind.global) : m Unit 
goal: m Unit

full_name: Lean.ScopedEnvExtension.getState
code: def ScopedEnvExtension.getState [Inhabited σ] (ext : ScopedEnvExtension α β σ) (env : Environment) : σ 
goal: σ

full_name: Lean.ScopedEnvExtension.activateScoped
code: def ScopedEnvExtension.activateScoped (ext : ScopedEnvExtension α β σ) (env : Environment) (namespaceName : Name) : Environment 
goal: Lean.Environment

full_name: Lean.ScopedEnvExtension.modifyState
code: def ScopedEnvExtension.modifyState (ext : ScopedEnvExtension α β σ) (env : Environment) (f : σ → σ) : Environment 
goal: Lean.Environment

full_name: Lean.pushScope
code: def pushScope [Monad m] [MonadEnv m] [MonadLiftT (ST IO.RealWorld) m] : m Unit 
goal: m Unit

full_name: Lean.popScope
code: def popScope [Monad m] [MonadEnv m] [MonadLiftT (ST IO.RealWorld) m] : m Unit 
goal: m Unit

full_name: Lean.activateScoped
code: def activateScoped [Monad m] [MonadEnv m] [MonadLiftT (ST IO.RealWorld) m] (namespaceName : Name) : m Unit 
goal: m Unit

full_name: Lean.SimpleScopedEnvExtension
code: abbrev SimpleScopedEnvExtension (α : Type) (σ : Type) 
goal: Type

full_name: Lean.SimpleScopedEnvExtension.Descr
code: structure SimpleScopedEnvExtension.Descr (α : Type) (σ : Type) where
  name           : Name := by exact decl_name%
  addEntry       : σ → α → σ
  initial        : σ
  finalizeImport : σ → σ := id
goal: Type

full_name: Lean.SimpleScopedEnvExtension.Descr.name
code: structure SimpleScopedEnvExtension.Descr (α : Type) (σ : Type) where
  name           : Name := by exact decl_name%
  addEntry       : σ → α → σ
  initial        : σ
  finalizeImport : σ → σ := id
goal: Lean.Name

full_name: Lean.SimpleScopedEnvExtension.Descr.initial
code: structure SimpleScopedEnvExtension.Descr (α : Type) (σ : Type) where
  name           : Name := by exact decl_name%
  addEntry       : σ → α → σ
  initial        : σ
  finalizeImport : σ → σ := id
goal: σ

full_name: Lean.SimpleScopedEnvExtension.Descr.finalizeImport
code: structure SimpleScopedEnvExtension.Descr (α : Type) (σ : Type) where
  name           : Name := by exact decl_name%
  addEntry       : σ → α → σ
  initial        : σ
  finalizeImport : σ → σ := id
goal: σ → σ

full_name: Lean.SimpleScopedEnvExtension.Descr.addEntry
code: structure SimpleScopedEnvExtension.Descr (α : Type) (σ : Type) where
  name           : Name := by exact decl_name%
  addEntry       : σ → α → σ
  initial        : σ
  finalizeImport : σ → σ := id
goal: σ → α → σ

full_name: Lean.registerSimpleScopedEnvExtension
code: def registerSimpleScopedEnvExtension (descr : SimpleScopedEnvExtension.Descr α σ) : IO (SimpleScopedEnvExtension α σ) 
goal: IO (Lean.SimpleScopedEnvExtension α σ)