File: .lake/packages/lean4/src/lean/Lean/Compiler/Specialize.lean

full_name: Lean.Compiler.SpecializeAttributeKind.nospecialize
code: inductive SpecializeAttributeKind where
  | specialize | nospecialize
  deriving Inhabited, BEq
goal: Lean.Compiler.SpecializeAttributeKind

full_name: Lean.Compiler.instInhabitedSpecializeAttributeKind
code: inductive SpecializeAttributeKind where
  | specialize | nospecialize
  deriving Inhabited, BEq
goal: Inhabited Lean.Compiler.SpecializeAttributeKind

full_name: Lean.Compiler.SpecializeAttributeKind.specialize
code: inductive SpecializeAttributeKind where
  | specialize | nospecialize
  deriving Inhabited, BEq
goal: Lean.Compiler.SpecializeAttributeKind

full_name: Lean.Compiler.SpecializeAttributeKind
code: inductive SpecializeAttributeKind where
  | specialize | nospecialize
  deriving Inhabited, BEq
goal: Type

full_name: Lean.Compiler.instBEqSpecializeAttributeKind
code: BEq
goal: BEq Lean.Compiler.SpecializeAttributeKind

full_name: Lean.Compiler.nospecializeAttr
code: builtin_initialize nospecializeAttr : TagAttribute ←
  registerTagAttribute `nospecialize "mark definition to never be specialized"
goal: Lean.TagAttribute

full_name: Lean.Compiler.initFn._@..lake.packages.lean4.src.lean.Lean.Compiler.Specialize._hyg.36
code: builtin_initialize nospecializeAttr : TagAttribute ←
  registerTagAttribute `nospecialize "mark definition to never be specialized"
goal: IO Lean.TagAttribute

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Compiler.Specialize.0.Lean.Compiler.elabSpecArgs
code: private def elabSpecArgs (declName : Name) (args : Array Syntax) : MetaM (Array Nat) 
goal: Lean.MetaM (Array Nat)

full_name: Lean.Compiler.specializeAttr
code: builtin_initialize specializeAttr : ParametricAttribute (Array Nat) ←
  registerParametricAttribute {
    name := `specialize
    descr := "mark definition to always be specialized"
    getParam := fun declName stx => do
      let args := stx[1].getArgs
      elabSpecArgs declName args |>.run'
  }
goal: Lean.ParametricAttribute (Array Nat)

full_name: Lean.Compiler.initFn._@..lake.packages.lean4.src.lean.Lean.Compiler.Specialize._hyg.696
code: builtin_initialize specializeAttr : ParametricAttribute (Array Nat) ←
  registerParametricAttribute {
    name := `specialize
    descr := "mark definition to always be specialized"
    getParam := fun declName stx => do
      let args := stx[1].getArgs
      elabSpecArgs declName args |>.run'
  }
goal: IO (Lean.ParametricAttribute (Array Nat))

full_name: Lean.Compiler.getSpecializationArgs?
code: def getSpecializationArgs? (env : Environment) (declName : Name) : Option (Array Nat) 
goal: Option (Array Nat)

full_name: Lean.Compiler.hasSpecializeAttribute
code: def hasSpecializeAttribute (env : Environment) (declName : Name) : Bool 
goal: Bool

full_name: Lean.Compiler.hasNospecializeAttribute
code: def hasNospecializeAttribute (env : Environment) (declName : Name) : Bool 
goal: Bool

full_name: Lean.Compiler.hasSpecializeAttributeOld
code: @[export lean_has_specialize_attribute]
partial def hasSpecializeAttributeOld (env : Environment) (n : Name) : Bool 
goal: Bool

full_name: Lean.Compiler.hasNospecializeAttributeOld
code: @[export lean_has_nospecialize_attribute]
partial def hasNospecializeAttributeOld (env : Environment) (n : Name) : Bool 
goal: Bool

full_name: Lean.Compiler.instInhabitedSpecArgKind
code: inductive SpecArgKind where
  | fixed
  | fixedNeutral -- computationally neutral
  | fixedHO      -- higher order
  | fixedInst    -- type class instance
  | other
  deriving Inhabited
goal: Inhabited Lean.Compiler.SpecArgKind

full_name: Lean.Compiler.SpecArgKind
code: inductive SpecArgKind where
  | fixed
  | fixedNeutral -- computationally neutral
  | fixedHO      -- higher order
  | fixedInst    -- type class instance
  | other
  deriving Inhabited
goal: Type

full_name: Lean.Compiler.SpecArgKind.fixed
code: inductive SpecArgKind where
  | fixed
  | fixedNeutral -- computationally neutral
  | fixedHO      -- higher order
  | fixedInst    -- type class instance
  | other
  deriving Inhabited
goal: Lean.Compiler.SpecArgKind

full_name: Lean.Compiler.SpecArgKind.fixedNeutral
code: inductive SpecArgKind where
  | fixed
  | fixedNeutral -- computationally neutral
  | fixedHO      -- higher order
  | fixedInst    -- type class instance
  | other
  deriving Inhabited
goal: Lean.Compiler.SpecArgKind

full_name: Lean.Compiler.SpecArgKind.fixedInst
code: inductive SpecArgKind where
  | fixed
  | fixedNeutral -- computationally neutral
  | fixedHO      -- higher order
  | fixedInst    -- type class instance
  | other
  deriving Inhabited
goal: Lean.Compiler.SpecArgKind

full_name: Lean.Compiler.SpecArgKind.other
code: inductive SpecArgKind where
  | fixed
  | fixedNeutral -- computationally neutral
  | fixedHO      -- higher order
  | fixedInst    -- type class instance
  | other
  deriving Inhabited
goal: Lean.Compiler.SpecArgKind

full_name: Lean.Compiler.SpecArgKind.fixedHO
code: inductive SpecArgKind where
  | fixed
  | fixedNeutral -- computationally neutral
  | fixedHO      -- higher order
  | fixedInst    -- type class instance
  | other
  deriving Inhabited
goal: Lean.Compiler.SpecArgKind

full_name: Lean.Compiler.SpecInfo
code: structure SpecInfo where
  mutualDecls : List Name
  argKinds : List SpecArgKind
  deriving Inhabited
goal: Type

full_name: Lean.Compiler.SpecInfo.argKinds
code: structure SpecInfo where
  mutualDecls : List Name
  argKinds : List SpecArgKind
  deriving Inhabited
goal: List Lean.Compiler.SpecArgKind

full_name: Lean.Compiler.instInhabitedSpecInfo
code: structure SpecInfo where
  mutualDecls : List Name
  argKinds : List SpecArgKind
  deriving Inhabited
goal: Inhabited Lean.Compiler.SpecInfo

full_name: Lean.Compiler.SpecInfo.mutualDecls
code: structure SpecInfo where
  mutualDecls : List Name
  argKinds : List SpecArgKind
  deriving Inhabited
goal: List Lean.Name

full_name: Lean.Compiler.instInhabitedSpecState
code: structure SpecState where
  specInfo : SMap Name SpecInfo := {}
  cache    : SMap Expr Name := {}
  deriving Inhabited
goal: Inhabited Lean.Compiler.SpecState

full_name: Lean.Compiler.SpecState
code: structure SpecState where
  specInfo : SMap Name SpecInfo := {}
  cache    : SMap Expr Name := {}
  deriving Inhabited
goal: Type

full_name: Lean.Compiler.SpecState.specInfo
code: structure SpecState where
  specInfo : SMap Name SpecInfo := {}
  cache    : SMap Expr Name := {}
  deriving Inhabited
goal: Lean.SMap Lean.Name Lean.Compiler.SpecInfo

full_name: Lean.Compiler.SpecState.cache
code: structure SpecState where
  specInfo : SMap Name SpecInfo := {}
  cache    : SMap Expr Name := {}
  deriving Inhabited
goal: Lean.SMap Lean.Expr Lean.Name

full_name: Lean.Compiler.SpecEntry.info
code: inductive SpecEntry where
  | info (name : Name) (info : SpecInfo)
  | cache (key : Expr) (fn : Name)
  deriving Inhabited
goal: Lean.Compiler.SpecEntry

full_name: Lean.Compiler.SpecEntry
code: inductive SpecEntry where
  | info (name : Name) (info : SpecInfo)
  | cache (key : Expr) (fn : Name)
  deriving Inhabited
goal: Type

full_name: Lean.Compiler.SpecEntry.cache
code: inductive SpecEntry where
  | info (name : Name) (info : SpecInfo)
  | cache (key : Expr) (fn : Name)
  deriving Inhabited
goal: Lean.Compiler.SpecEntry

full_name: Lean.Compiler.instInhabitedSpecEntry
code: inductive SpecEntry where
  | info (name : Name) (info : SpecInfo)
  | cache (key : Expr) (fn : Name)
  deriving Inhabited
goal: Inhabited Lean.Compiler.SpecEntry

full_name: Lean.Compiler.SpecState.addEntry
code: def addEntry (s : SpecState) (e : SpecEntry) : SpecState 
goal: Lean.Compiler.SpecState

full_name: Lean.Compiler.SpecState.switch
code: def switch : SpecState → SpecState
  
goal: Lean.Compiler.SpecState → Lean.Compiler.SpecState

full_name: Lean.Compiler.initFn._@..lake.packages.lean4.src.lean.Lean.Compiler.Specialize._hyg.1086
code: builtin_initialize specExtension : SimplePersistentEnvExtension SpecEntry SpecState ←
  registerSimplePersistentEnvExtension {
    addEntryFn    := SpecState.addEntry,
    addImportedFn := fun es => (mkStateFromImportedEntries SpecState.addEntry {} es).switch
  }
goal: IO (Lean.SimplePersistentEnvExtension Lean.Compiler.SpecEntry Lean.Compiler.SpecState)

full_name: Lean.Compiler.specExtension
code: builtin_initialize specExtension : SimplePersistentEnvExtension SpecEntry SpecState ←
  registerSimplePersistentEnvExtension {
    addEntryFn    := SpecState.addEntry,
    addImportedFn := fun es => (mkStateFromImportedEntries SpecState.addEntry {} es).switch
  }
goal: Lean.SimplePersistentEnvExtension Lean.Compiler.SpecEntry Lean.Compiler.SpecState

full_name: Lean.Compiler.addSpecializationInfo
code: @[export lean_add_specialization_info]
def addSpecializationInfo (env : Environment) (fn : Name) (info : SpecInfo) : Environment 
goal: Lean.Environment

full_name: Lean.Compiler.getSpecializationInfo
code: @[export lean_get_specialization_info]
def getSpecializationInfo (env : Environment) (fn : Name) : Option SpecInfo 
goal: Option Lean.Compiler.SpecInfo

full_name: Lean.Compiler.cacheSpecialization
code: @[export lean_cache_specialization]
def cacheSpecialization (env : Environment) (e : Expr) (fn : Name) : Environment 
goal: Lean.Environment

full_name: Lean.Compiler.getCachedSpecialization
code: @[export lean_get_cached_specialization]
def getCachedSpecialization (env : Environment) (e : Expr) : Option Name 
goal: Option Lean.Name