File: .lake/packages/lean4/src/lean/Lean/Compiler/IR/CompilerM.lean

full_name: Lean.IR.LogEntry
code: inductive LogEntry where
  | step (cls : Name) (decls : Array Decl)
  | message (msg : Format)
goal: Type

full_name: Lean.IR.LogEntry.step
code: inductive LogEntry where
  | step (cls : Name) (decls : Array Decl)
  | message (msg : Format)
goal: Lean.IR.LogEntry

full_name: Lean.IR.LogEntry.message
code: inductive LogEntry where
  | step (cls : Name) (decls : Array Decl)
  | message (msg : Format)
goal: Lean.IR.LogEntry

full_name: Lean.IR.LogEntry.fmt
code: protected def fmt : LogEntry → Format
  
goal: Lean.IR.LogEntry → Lean.Format

full_name: Lean.IR.LogEntry.instToFormat
code: instance : ToFormat LogEntry 
goal: Lean.ToFormat Lean.IR.LogEntry

full_name: Lean.IR.Log
code: abbrev Log 
goal: Type

full_name: Lean.IR.Log.format
code: def Log.format (log : Log) : Format 
goal: Lean.Format

full_name: Lean.IR.Log.toString
code: @[export lean_ir_log_to_string]
def Log.toString (log : Log) : String 
goal: String

full_name: Lean.IR.CompilerState.env
code: structure CompilerState where
  env : Environment
  log : Log := #[]
goal: Lean.Environment

full_name: Lean.IR.CompilerState
code: structure CompilerState where
  env : Environment
  log : Log := #[]
goal: Type

full_name: Lean.IR.CompilerState.log
code: structure CompilerState where
  env : Environment
  log : Log := #[]
goal: Lean.IR.Log

full_name: Lean.IR.CompilerM
code: abbrev CompilerM 
goal: Type

full_name: Lean.IR.log
code: def log (entry : LogEntry) : CompilerM Unit 
goal: Lean.IR.CompilerM Unit

full_name: Lean.IR.tracePrefixOptionName
code: def tracePrefixOptionName 
goal: Lean.Name

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.IR.CompilerM.0.Lean.IR.isLogEnabledFor
code: private def isLogEnabledFor (opts : Options) (optName : Name) : Bool 
goal: Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.IR.CompilerM.0.Lean.IR.logDeclsAux
code: private def logDeclsAux (optName : Name) (cls : Name) (decls : Array Decl) : CompilerM Unit 
goal: Lean.IR.CompilerM Unit

full_name: Lean.IR.logDecls
code: @[inline] def logDecls (cls : Name) (decl : Array Decl) : CompilerM Unit 
goal: Lean.IR.CompilerM Unit

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.IR.CompilerM.0.Lean.IR.logMessageIfAux
code: private def logMessageIfAux {α : Type} [ToFormat α] (optName : Name) (a : α) : CompilerM Unit 
goal: Lean.IR.CompilerM Unit

full_name: Lean.IR.logMessageIf
code: @[inline] def logMessageIf {α : Type} [ToFormat α] (cls : Name) (a : α) : CompilerM Unit 
goal: Lean.IR.CompilerM Unit

full_name: Lean.IR.logMessage
code: @[inline] def logMessage {α : Type} [ToFormat α] (a : α) : CompilerM Unit 
goal: Lean.IR.CompilerM Unit

full_name: Lean.IR.modifyEnv
code: @[inline] def modifyEnv (f : Environment → Environment) : CompilerM Unit 
goal: Lean.IR.CompilerM Unit

full_name: Lean.IR.DeclMap
code: abbrev DeclMap 
goal: Type

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.IR.CompilerM.0.Lean.IR.declLt
code: private abbrev declLt (a b : Decl) 
goal: Bool

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.IR.CompilerM.0.Lean.IR.sortDecls
code: private abbrev sortDecls (decls : Array Decl) : Array Decl 
goal: Array Lean.IR.Decl

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.IR.CompilerM.0.Lean.IR.findAtSorted?
code: private abbrev findAtSorted? (decls : Array Decl) (declName : Name) : Option Decl 
goal: Option Lean.IR.Decl

full_name: Lean.IR.initFn._@..lake.packages.lean4.src.lean.Lean.Compiler.IR.CompilerM._hyg.466
code: builtin_initialize declMapExt : SimplePersistentEnvExtension Decl DeclMap ←
  registerSimplePersistentEnvExtension {
    addImportedFn := fun _ => {}
    addEntryFn    := fun s d => s.insert d.name d
    toArrayFn     := fun s =>
      let decls := s.foldl (init := #[]) fun decls decl => decls.push decl
      sortDecls decls
  }
goal: IO (Lean.SimplePersistentEnvExtension Lean.IR.Decl Lean.IR.DeclMap)

full_name: Lean.IR.declMapExt
code: builtin_initialize declMapExt : SimplePersistentEnvExtension Decl DeclMap ←
  registerSimplePersistentEnvExtension {
    addImportedFn := fun _ => {}
    addEntryFn    := fun s d => s.insert d.name d
    toArrayFn     := fun s =>
      let decls := s.foldl (init := #[]) fun decls decl => decls.push decl
      sortDecls decls
  }
goal: Lean.SimplePersistentEnvExtension Lean.IR.Decl Lean.IR.DeclMap

full_name: Lean.IR.findEnvDecl
code: @[export lean_ir_find_env_decl]
def findEnvDecl (env : Environment) (declName : Name) : Option Decl 
goal: Option Lean.IR.Decl

full_name: Lean.IR.findDecl
code: def findDecl (n : Name) : CompilerM (Option Decl) 
goal: Lean.IR.CompilerM (Option Lean.IR.Decl)

full_name: Lean.IR.containsDecl
code: def containsDecl (n : Name) : CompilerM Bool 
goal: Lean.IR.CompilerM Bool

full_name: Lean.IR.getDecl
code: def getDecl (n : Name) : CompilerM Decl 
goal: Lean.IR.CompilerM Lean.IR.Decl

full_name: Lean.IR.addDeclAux
code: @[export lean_ir_add_decl]
def addDeclAux (env : Environment) (decl : Decl) : Environment 
goal: Lean.Environment

full_name: Lean.IR.getDecls
code: def getDecls (env : Environment) : List Decl 
goal: List Lean.IR.Decl

full_name: Lean.IR.getEnv
code: def getEnv : CompilerM Environment 
goal: Lean.IR.CompilerM Lean.Environment

full_name: Lean.IR.addDecl
code: def addDecl (decl : Decl) : CompilerM Unit 
goal: Lean.IR.CompilerM Unit

full_name: Lean.IR.addDecls
code: def addDecls (decls : Array Decl) : CompilerM Unit 
goal: Lean.IR.CompilerM Unit

full_name: Lean.IR.findEnvDecl'
code: def findEnvDecl' (env : Environment) (n : Name) (decls : Array Decl) : Option Decl 
goal: Option Lean.IR.Decl

full_name: Lean.IR.findDecl'
code: def findDecl' (n : Name) (decls : Array Decl) : CompilerM (Option Decl) 
goal: Lean.IR.CompilerM (Option Lean.IR.Decl)

full_name: Lean.IR.containsDecl'
code: def containsDecl' (n : Name) (decls : Array Decl) : CompilerM Bool 
goal: Lean.IR.CompilerM Bool

full_name: Lean.IR.getDecl'
code: def getDecl' (n : Name) (decls : Array Decl) : CompilerM Decl 
goal: Lean.IR.CompilerM Lean.IR.Decl

full_name: Lean.IR.getSorryDep
code: @[export lean_decl_get_sorry_dep]
def getSorryDep (env : Environment) (declName : Name) : Option Name 
goal: Option Lean.Name