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

full_name: Lean.AttributeApplicationTime
code: inductive AttributeApplicationTime where
  | afterTypeChecking | afterCompilation | beforeElaboration
  deriving Inhabited, BEq
goal: Type

full_name: Lean.AttributeApplicationTime.afterCompilation
code: inductive AttributeApplicationTime where
  | afterTypeChecking | afterCompilation | beforeElaboration
  deriving Inhabited, BEq
goal: Lean.AttributeApplicationTime

full_name: Lean.AttributeApplicationTime.beforeElaboration
code: inductive AttributeApplicationTime where
  | afterTypeChecking | afterCompilation | beforeElaboration
  deriving Inhabited, BEq
goal: Lean.AttributeApplicationTime

full_name: Lean.AttributeApplicationTime.afterTypeChecking
code: inductive AttributeApplicationTime where
  | afterTypeChecking | afterCompilation | beforeElaboration
  deriving Inhabited, BEq
goal: Lean.AttributeApplicationTime

full_name: Lean.instInhabitedAttributeApplicationTime
code: inductive AttributeApplicationTime where
  | afterTypeChecking | afterCompilation | beforeElaboration
  deriving Inhabited, BEq
goal: Inhabited Lean.AttributeApplicationTime

full_name: Lean.instBEqAttributeApplicationTime
code: BEq
goal: BEq Lean.AttributeApplicationTime

full_name: Lean.AttrM
code: abbrev AttrM 
goal: Type

full_name: Lean.instMonadLiftImportMAttrM
code: instance : MonadLift ImportM AttrM 
goal: MonadLift Lean.ImportM Lean.AttrM

full_name: Lean.AttributeImplCore.applicationTime
code: structure AttributeImplCore where
  /-- This is used as the target for go-to-definition queries for simple attributes -/
  ref : Name := by exact decl_name%
  name : Name
  descr : String
  applicationTime := AttributeApplicationTime.afterTypeChecking
  deriving Inhabited
goal: Lean.AttributeApplicationTime

full_name: Lean.instInhabitedAttributeImplCore
code: structure AttributeImplCore where
  /-- This is used as the target for go-to-definition queries for simple attributes -/
  ref : Name := by exact decl_name%
  name : Name
  descr : String
  applicationTime := AttributeApplicationTime.afterTypeChecking
  deriving Inhabited
goal: Inhabited Lean.AttributeImplCore

full_name: Lean.AttributeImplCore.descr
code: structure AttributeImplCore where
  /-- This is used as the target for go-to-definition queries for simple attributes -/
  ref : Name := by exact decl_name%
  name : Name
  descr : String
  applicationTime := AttributeApplicationTime.afterTypeChecking
  deriving Inhabited
goal: String

full_name: Lean.AttributeImplCore.ref
code: structure AttributeImplCore where
  /-- This is used as the target for go-to-definition queries for simple attributes -/
  ref : Name := by exact decl_name%
  name : Name
  descr : String
  applicationTime := AttributeApplicationTime.afterTypeChecking
  deriving Inhabited
goal: Lean.Name

full_name: Lean.AttributeImplCore.name
code: structure AttributeImplCore where
  /-- This is used as the target for go-to-definition queries for simple attributes -/
  ref : Name := by exact decl_name%
  name : Name
  descr : String
  applicationTime := AttributeApplicationTime.afterTypeChecking
  deriving Inhabited
goal: Lean.Name

full_name: Lean.AttributeImplCore
code: structure AttributeImplCore where
  /-- This is used as the target for go-to-definition queries for simple attributes -/
  ref : Name := by exact decl_name%
  name : Name
  descr : String
  applicationTime := AttributeApplicationTime.afterTypeChecking
  deriving Inhabited
goal: Type

full_name: Lean.AttributeKind.global
code: /-- You can tag attributes with the 'local' or 'scoped' kind.
For example: `attribute [local myattr, scoped yourattr, theirattr]`.

This is used to indicate how an attribute should be scoped.
- local means that the attribute should only be applied in the current scope and forgotten once the current section, namespace, or file is closed.
- scoped means that the attribute should only be applied while the namespace is open.
- global means that the attribute should always be applied.

Note that the attribute handler (`AttributeImpl.add`) is responsible for interpreting the kind and
making sure that these kinds are respected.
-/
inductive AttributeKind
  | global | local | scoped
  deriving BEq, Inhabited
goal: Lean.AttributeKind

full_name: Lean.AttributeKind.local
code: /-- You can tag attributes with the 'local' or 'scoped' kind.
For example: `attribute [local myattr, scoped yourattr, theirattr]`.

This is used to indicate how an attribute should be scoped.
- local means that the attribute should only be applied in the current scope and forgotten once the current section, namespace, or file is closed.
- scoped means that the attribute should only be applied while the namespace is open.
- global means that the attribute should always be applied.

Note that the attribute handler (`AttributeImpl.add`) is responsible for interpreting the kind and
making sure that these kinds are respected.
-/
inductive AttributeKind
  | global | local | scoped
  deriving BEq, Inhabited
goal: Lean.AttributeKind

full_name: Lean.instInhabitedAttributeKind
code: /-- You can tag attributes with the 'local' or 'scoped' kind.
For example: `attribute [local myattr, scoped yourattr, theirattr]`.

This is used to indicate how an attribute should be scoped.
- local means that the attribute should only be applied in the current scope and forgotten once the current section, namespace, or file is closed.
- scoped means that the attribute should only be applied while the namespace is open.
- global means that the attribute should always be applied.

Note that the attribute handler (`AttributeImpl.add`) is responsible for interpreting the kind and
making sure that these kinds are respected.
-/
inductive AttributeKind
  | global | local | scoped
  deriving BEq, Inhabited
goal: Inhabited Lean.AttributeKind

full_name: Lean.AttributeKind
code: /-- You can tag attributes with the 'local' or 'scoped' kind.
For example: `attribute [local myattr, scoped yourattr, theirattr]`.

This is used to indicate how an attribute should be scoped.
- local means that the attribute should only be applied in the current scope and forgotten once the current section, namespace, or file is closed.
- scoped means that the attribute should only be applied while the namespace is open.
- global means that the attribute should always be applied.

Note that the attribute handler (`AttributeImpl.add`) is responsible for interpreting the kind and
making sure that these kinds are respected.
-/
inductive AttributeKind
  | global | local | scoped
  deriving BEq, Inhabited
goal: Type

full_name: Lean.AttributeKind.scoped
code: /-- You can tag attributes with the 'local' or 'scoped' kind.
For example: `attribute [local myattr, scoped yourattr, theirattr]`.

This is used to indicate how an attribute should be scoped.
- local means that the attribute should only be applied in the current scope and forgotten once the current section, namespace, or file is closed.
- scoped means that the attribute should only be applied while the namespace is open.
- global means that the attribute should always be applied.

Note that the attribute handler (`AttributeImpl.add`) is responsible for interpreting the kind and
making sure that these kinds are respected.
-/
inductive AttributeKind
  | global | local | scoped
  deriving BEq, Inhabited
goal: Lean.AttributeKind

full_name: Lean.instBEqAttributeKind
code: BEq
goal: BEq Lean.AttributeKind

full_name: Lean.instToStringAttributeKind
code: instance : ToString AttributeKind 
goal: ToString Lean.AttributeKind

full_name: Lean.AttributeImpl.erase
code: structure AttributeImpl extends AttributeImplCore where
  /-- This is run when the attribute is applied to a declaration `decl`. `stx` is the syntax of the attribute including arguments. -/
  add (decl : Name) (stx : Syntax) (kind : AttributeKind) : AttrM Unit
  erase (decl : Name) : AttrM Unit := throwError "attribute cannot be erased"
  deriving Inhabited
goal: Lean.AttrM Unit

full_name: Lean.AttributeImpl
code: structure AttributeImpl extends AttributeImplCore where
  /-- This is run when the attribute is applied to a declaration `decl`. `stx` is the syntax of the attribute including arguments. -/
  add (decl : Name) (stx : Syntax) (kind : AttributeKind) : AttrM Unit
  erase (decl : Name) : AttrM Unit := throwError "attribute cannot be erased"
  deriving Inhabited
goal: Type

full_name: Lean.AttributeImpl.add
code: structure AttributeImpl extends AttributeImplCore where
  /-- This is run when the attribute is applied to a declaration `decl`. `stx` is the syntax of the attribute including arguments. -/
  add (decl : Name) (stx : Syntax) (kind : AttributeKind) : AttrM Unit
  erase (decl : Name) : AttrM Unit := throwError "attribute cannot be erased"
  deriving Inhabited
goal: Lean.AttrM Unit

full_name: Lean.instInhabitedAttributeImpl
code: structure AttributeImpl extends AttributeImplCore where
  /-- This is run when the attribute is applied to a declaration `decl`. `stx` is the syntax of the attribute including arguments. -/
  add (decl : Name) (stx : Syntax) (kind : AttributeKind) : AttrM Unit
  erase (decl : Name) : AttrM Unit := throwError "attribute cannot be erased"
  deriving Inhabited
goal: Inhabited Lean.AttributeImpl

full_name: Lean.attributeMapRef
code: builtin_initialize attributeMapRef : IO.Ref (HashMap Name AttributeImpl) ← IO.mkRef {}
goal: IO.Ref (Lean.HashMap Lean.Name Lean.AttributeImpl)

full_name: Lean.initFn._@..lake.packages.lean4.src.lean.Lean.Attributes._hyg.277
code: builtin_initialize attributeMapRef : IO.Ref (HashMap Name AttributeImpl) ← IO.mkRef {}
goal: IO (IO.Ref (Lean.HashMap Lean.Name Lean.AttributeImpl))

full_name: Lean.registerBuiltinAttribute
code: /-- Low level attribute registration function. -/
def registerBuiltinAttribute (attr : AttributeImpl) : IO Unit 
goal: IO Unit

full_name: Lean.Attribute.Builtin.ensureNoArgs
code: def Attribute.Builtin.ensureNoArgs (stx : Syntax) : AttrM Unit 
goal: Lean.AttrM Unit

full_name: Lean.Attribute.Builtin.getIdent?
code: def Attribute.Builtin.getIdent? (stx : Syntax) : AttrM (Option Syntax) 
goal: Lean.AttrM (Option Lean.Syntax)

full_name: Lean.Attribute.Builtin.getIdent
code: def Attribute.Builtin.getIdent (stx : Syntax) : AttrM Syntax 
goal: Lean.AttrM Lean.Syntax

full_name: Lean.Attribute.Builtin.getId?
code: def Attribute.Builtin.getId? (stx : Syntax) : AttrM (Option Name) 
goal: Lean.AttrM (Option Lean.Name)

full_name: Lean.Attribute.Builtin.getId
code: def Attribute.Builtin.getId (stx : Syntax) : AttrM Name 
goal: Lean.AttrM Lean.Name

full_name: Lean.getAttrParamOptPrio
code: def getAttrParamOptPrio (optPrioStx : Syntax) : AttrM Nat 
goal: Lean.AttrM Nat

full_name: Lean.Attribute.Builtin.getPrio
code: def Attribute.Builtin.getPrio (stx : Syntax) : AttrM Nat 
goal: Lean.AttrM Nat

full_name: Lean.TagAttribute.attr
code: /--
  Tag attributes are simple and efficient. They are useful for marking declarations in the modules where
  they were defined.

  The startup cost for this kind of attribute is very small since `addImportedFn` is a constant function.

  They provide the predicate `tagAttr.hasTag env decl` which returns true iff declaration `decl`
  is tagged in the environment `env`. -/
structure TagAttribute where
  attr : AttributeImpl
  ext  : PersistentEnvExtension Name Name NameSet
  deriving Inhabited
goal: Lean.AttributeImpl

full_name: Lean.instInhabitedTagAttribute
code: /--
  Tag attributes are simple and efficient. They are useful for marking declarations in the modules where
  they were defined.

  The startup cost for this kind of attribute is very small since `addImportedFn` is a constant function.

  They provide the predicate `tagAttr.hasTag env decl` which returns true iff declaration `decl`
  is tagged in the environment `env`. -/
structure TagAttribute where
  attr : AttributeImpl
  ext  : PersistentEnvExtension Name Name NameSet
  deriving Inhabited
goal: Inhabited Lean.TagAttribute

full_name: Lean.TagAttribute.ext
code: /--
  Tag attributes are simple and efficient. They are useful for marking declarations in the modules where
  they were defined.

  The startup cost for this kind of attribute is very small since `addImportedFn` is a constant function.

  They provide the predicate `tagAttr.hasTag env decl` which returns true iff declaration `decl`
  is tagged in the environment `env`. -/
structure TagAttribute where
  attr : AttributeImpl
  ext  : PersistentEnvExtension Name Name NameSet
  deriving Inhabited
goal: Lean.PersistentEnvExtension Lean.Name Lean.Name Lean.NameSet

full_name: Lean.TagAttribute
code: /--
  Tag attributes are simple and efficient. They are useful for marking declarations in the modules where
  they were defined.

  The startup cost for this kind of attribute is very small since `addImportedFn` is a constant function.

  They provide the predicate `tagAttr.hasTag env decl` which returns true iff declaration `decl`
  is tagged in the environment `env`. -/
structure TagAttribute where
  attr : AttributeImpl
  ext  : PersistentEnvExtension Name Name NameSet
  deriving Inhabited
goal: Type

full_name: Lean.registerTagAttribute
code: def registerTagAttribute (name : Name) (descr : String)
    (validate : Name → AttrM Unit := fun _ => pure ()) (ref : Name := by exact decl_name%) (applicationTime := AttributeApplicationTime.afterTypeChecking) : IO TagAttribute 
goal: IO Lean.TagAttribute

full_name: Lean.TagAttribute.hasTag
code: def hasTag (attr : TagAttribute) (env : Environment) (decl : Name) : Bool 
goal: Bool

full_name: Lean.ParametricAttribute.ext
code: /--
  A `TagAttribute` variant where we can attach parameters to attributes.
  It is slightly more expensive and consumes a little bit more memory than `TagAttribute`.

  They provide the function `pAttr.getParam env decl` which returns `some p` iff declaration `decl`
  contains the attribute `pAttr` with parameter `p`. -/
structure ParametricAttribute (α : Type) where
  attr : AttributeImpl
  ext  : PersistentEnvExtension (Name × α) (Name × α) (NameMap α)
  deriving Inhabited
goal: Lean.PersistentEnvExtension (Lean.Name × α) (Lean.Name × α) (Lean.NameMap α)

full_name: Lean.instInhabitedParametricAttribute
code: /--
  A `TagAttribute` variant where we can attach parameters to attributes.
  It is slightly more expensive and consumes a little bit more memory than `TagAttribute`.

  They provide the function `pAttr.getParam env decl` which returns `some p` iff declaration `decl`
  contains the attribute `pAttr` with parameter `p`. -/
structure ParametricAttribute (α : Type) where
  attr : AttributeImpl
  ext  : PersistentEnvExtension (Name × α) (Name × α) (NameMap α)
  deriving Inhabited
goal: {a : Type} → Inhabited (Lean.ParametricAttribute a)

full_name: Lean.ParametricAttribute
code: /--
  A `TagAttribute` variant where we can attach parameters to attributes.
  It is slightly more expensive and consumes a little bit more memory than `TagAttribute`.

  They provide the function `pAttr.getParam env decl` which returns `some p` iff declaration `decl`
  contains the attribute `pAttr` with parameter `p`. -/
structure ParametricAttribute (α : Type) where
  attr : AttributeImpl
  ext  : PersistentEnvExtension (Name × α) (Name × α) (NameMap α)
  deriving Inhabited
goal: Type

full_name: Lean.ParametricAttribute.attr
code: /--
  A `TagAttribute` variant where we can attach parameters to attributes.
  It is slightly more expensive and consumes a little bit more memory than `TagAttribute`.

  They provide the function `pAttr.getParam env decl` which returns `some p` iff declaration `decl`
  contains the attribute `pAttr` with parameter `p`. -/
structure ParametricAttribute (α : Type) where
  attr : AttributeImpl
  ext  : PersistentEnvExtension (Name × α) (Name × α) (NameMap α)
  deriving Inhabited
goal: Lean.AttributeImpl

full_name: Lean.ParametricAttributeImpl.getParam
code: structure ParametricAttributeImpl (α : Type) extends AttributeImplCore where
  getParam : Name → Syntax → AttrM α
  afterSet : Name → α → AttrM Unit := fun _ _ _ => pure ()
  afterImport : Array (Array (Name × α)) → ImportM Unit := fun _ => pure ()
goal: Lean.Name → Lean.Syntax → Lean.AttrM α

full_name: Lean.ParametricAttributeImpl
code: structure ParametricAttributeImpl (α : Type) extends AttributeImplCore where
  getParam : Name → Syntax → AttrM α
  afterSet : Name → α → AttrM Unit := fun _ _ _ => pure ()
  afterImport : Array (Array (Name × α)) → ImportM Unit := fun _ => pure ()
goal: Type

full_name: Lean.ParametricAttributeImpl.afterImport
code: structure ParametricAttributeImpl (α : Type) extends AttributeImplCore where
  getParam : Name → Syntax → AttrM α
  afterSet : Name → α → AttrM Unit := fun _ _ _ => pure ()
  afterImport : Array (Array (Name × α)) → ImportM Unit := fun _ => pure ()
goal: Array (Array (Lean.Name × α)) → Lean.ImportM Unit

full_name: Lean.ParametricAttributeImpl.afterSet
code: structure ParametricAttributeImpl (α : Type) extends AttributeImplCore where
  getParam : Name → Syntax → AttrM α
  afterSet : Name → α → AttrM Unit := fun _ _ _ => pure ()
  afterImport : Array (Array (Name × α)) → ImportM Unit := fun _ => pure ()
goal: Lean.Name → α → Lean.AttrM Unit

full_name: Lean.registerParametricAttribute
code: def registerParametricAttribute (impl : ParametricAttributeImpl α) : IO (ParametricAttribute α) 
goal: IO (Lean.ParametricAttribute α)

full_name: Lean.ParametricAttribute.getParam?
code: def getParam? [Inhabited α] (attr : ParametricAttribute α) (env : Environment) (decl : Name) : Option α 
goal: Option α

full_name: Lean.ParametricAttribute.setParam
code: def setParam (attr : ParametricAttribute α) (env : Environment) (decl : Name) (param : α) : Except String Environment 
goal: Except String Lean.Environment

full_name: Lean.EnumAttributes
code: /--
  Given a list `[a₁, ..., a_n]` of elements of type `α`, `EnumAttributes` provides an attribute `Attr_i` for
  associating a value `a_i` with an declaration. `α` is usually an enumeration type.
  Note that whenever we register an `EnumAttributes`, we create `n` attributes, but only one environment extension. -/
structure EnumAttributes (α : Type) where
  attrs : List AttributeImpl
  ext   : PersistentEnvExtension (Name × α) (Name × α) (NameMap α)
  deriving Inhabited
goal: Type

full_name: Lean.EnumAttributes.attrs
code: /--
  Given a list `[a₁, ..., a_n]` of elements of type `α`, `EnumAttributes` provides an attribute `Attr_i` for
  associating a value `a_i` with an declaration. `α` is usually an enumeration type.
  Note that whenever we register an `EnumAttributes`, we create `n` attributes, but only one environment extension. -/
structure EnumAttributes (α : Type) where
  attrs : List AttributeImpl
  ext   : PersistentEnvExtension (Name × α) (Name × α) (NameMap α)
  deriving Inhabited
goal: List Lean.AttributeImpl

full_name: Lean.EnumAttributes.ext
code: /--
  Given a list `[a₁, ..., a_n]` of elements of type `α`, `EnumAttributes` provides an attribute `Attr_i` for
  associating a value `a_i` with an declaration. `α` is usually an enumeration type.
  Note that whenever we register an `EnumAttributes`, we create `n` attributes, but only one environment extension. -/
structure EnumAttributes (α : Type) where
  attrs : List AttributeImpl
  ext   : PersistentEnvExtension (Name × α) (Name × α) (NameMap α)
  deriving Inhabited
goal: Lean.PersistentEnvExtension (Lean.Name × α) (Lean.Name × α) (Lean.NameMap α)

full_name: Lean.instInhabitedEnumAttributes
code: /--
  Given a list `[a₁, ..., a_n]` of elements of type `α`, `EnumAttributes` provides an attribute `Attr_i` for
  associating a value `a_i` with an declaration. `α` is usually an enumeration type.
  Note that whenever we register an `EnumAttributes`, we create `n` attributes, but only one environment extension. -/
structure EnumAttributes (α : Type) where
  attrs : List AttributeImpl
  ext   : PersistentEnvExtension (Name × α) (Name × α) (NameMap α)
  deriving Inhabited
goal: {a : Type} → Inhabited (Lean.EnumAttributes a)

full_name: Lean.registerEnumAttributes
code: def registerEnumAttributes (attrDescrs : List (Name × String × α))
    (validate : Name → α → AttrM Unit := fun _ _ => pure ())
    (applicationTime := AttributeApplicationTime.afterTypeChecking)
    (ref : Name := by exact decl_name%) : IO (EnumAttributes α) 
goal: IO (Lean.EnumAttributes α)

full_name: Lean.EnumAttributes.getValue
code: def getValue [Inhabited α] (attr : EnumAttributes α) (env : Environment) (decl : Name) : Option α 
goal: Option α

full_name: Lean.EnumAttributes.setValue
code: def setValue (attrs : EnumAttributes α) (env : Environment) (decl : Name) (val : α) : Except String Environment 
goal: Except String Lean.Environment

full_name: Lean.AttributeImplBuilder
code: abbrev AttributeImplBuilder 
goal: Type

full_name: Lean.AttributeImplBuilderTable
code: abbrev AttributeImplBuilderTable 
goal: Type

full_name: Lean.initFn._@..lake.packages.lean4.src.lean.Lean.Attributes._hyg.3164
code: builtin_initialize attributeImplBuilderTableRef : IO.Ref AttributeImplBuilderTable ← IO.mkRef {}
goal: IO (IO.Ref Lean.AttributeImplBuilderTable)

full_name: Lean.attributeImplBuilderTableRef
code: builtin_initialize attributeImplBuilderTableRef : IO.Ref AttributeImplBuilderTable ← IO.mkRef {}
goal: IO.Ref Lean.AttributeImplBuilderTable

full_name: Lean.registerAttributeImplBuilder
code: def registerAttributeImplBuilder (builderId : Name) (builder : AttributeImplBuilder) : IO Unit 
goal: IO Unit

full_name: Lean.mkAttributeImplOfBuilder
code: def mkAttributeImplOfBuilder (builderId ref : Name) (args : List DataValue) : IO AttributeImpl 
goal: IO Lean.AttributeImpl

full_name: Lean.AttributeExtensionOLeanEntry.builder
code: inductive AttributeExtensionOLeanEntry where
  | decl (declName : Name) -- `declName` has type `AttributeImpl`
  | builder (builderId ref : Name) (args : List DataValue)
goal: Lean.AttributeExtensionOLeanEntry

full_name: Lean.AttributeExtensionOLeanEntry
code: inductive AttributeExtensionOLeanEntry where
  | decl (declName : Name) -- `declName` has type `AttributeImpl`
  | builder (builderId ref : Name) (args : List DataValue)
goal: Type

full_name: Lean.AttributeExtensionOLeanEntry.decl
code: inductive AttributeExtensionOLeanEntry where
  | decl (declName : Name) -- `declName` has type `AttributeImpl`
  | builder (builderId ref : Name) (args : List DataValue)
goal: Lean.AttributeExtensionOLeanEntry

full_name: Lean.AttributeExtensionState.newEntries
code: structure AttributeExtensionState where
  newEntries : List AttributeExtensionOLeanEntry := []
  map        : HashMap Name AttributeImpl
  deriving Inhabited
goal: List Lean.AttributeExtensionOLeanEntry

full_name: Lean.AttributeExtensionState.map
code: structure AttributeExtensionState where
  newEntries : List AttributeExtensionOLeanEntry := []
  map        : HashMap Name AttributeImpl
  deriving Inhabited
goal: Lean.HashMap Lean.Name Lean.AttributeImpl

full_name: Lean.instInhabitedAttributeExtensionState
code: structure AttributeExtensionState where
  newEntries : List AttributeExtensionOLeanEntry := []
  map        : HashMap Name AttributeImpl
  deriving Inhabited
goal: Inhabited Lean.AttributeExtensionState

full_name: Lean.AttributeExtensionState
code: structure AttributeExtensionState where
  newEntries : List AttributeExtensionOLeanEntry := []
  map        : HashMap Name AttributeImpl
  deriving Inhabited
goal: Type

full_name: Lean.AttributeExtension
code: abbrev AttributeExtension 
goal: Type

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Attributes.0.Lean.AttributeExtension.mkInitial
code: private def AttributeExtension.mkInitial : IO AttributeExtensionState 
goal: IO Lean.AttributeExtensionState

full_name: Lean.mkAttributeImplOfConstantUnsafe
code: unsafe def mkAttributeImplOfConstantUnsafe (env : Environment) (opts : Options) (declName : Name) : Except String AttributeImpl 
goal: Except String Lean.AttributeImpl

full_name: Lean.mkAttributeImplOfConstant
code: @[implemented_by mkAttributeImplOfConstantUnsafe]
opaque mkAttributeImplOfConstant (env : Environment) (opts : Options) (declName : Name) : Except String AttributeImpl
goal: Except String Lean.AttributeImpl

full_name: Lean.mkAttributeImplOfEntry
code: def mkAttributeImplOfEntry (env : Environment) (opts : Options) (e : AttributeExtensionOLeanEntry) : IO AttributeImpl 
goal: IO Lean.AttributeImpl

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Attributes.0.Lean.AttributeExtension.addImported
code: private def AttributeExtension.addImported (es : Array (Array AttributeExtensionOLeanEntry)) : ImportM AttributeExtensionState 
goal: Lean.ImportM Lean.AttributeExtensionState

full_name: _private.«.lake».packages.lean4.src.lean.Lean.Attributes.0.Lean.addAttrEntry
code: private def addAttrEntry (s : AttributeExtensionState) (e : AttributeExtensionOLeanEntry × AttributeImpl) : AttributeExtensionState 
goal: Lean.AttributeExtensionState

full_name: Lean.attributeExtension
code: builtin_initialize attributeExtension : AttributeExtension ←
  registerPersistentEnvExtension {
    mkInitial       := AttributeExtension.mkInitial
    addImportedFn   := AttributeExtension.addImported
    addEntryFn      := addAttrEntry
    exportEntriesFn := fun s => s.newEntries.reverse.toArray
    statsFn         := fun s => format "number of local entries: " ++ format s.newEntries.length
  }
goal: Lean.AttributeExtension

full_name: Lean.initFn._@..lake.packages.lean4.src.lean.Lean.Attributes._hyg.3784
code: builtin_initialize attributeExtension : AttributeExtension ←
  registerPersistentEnvExtension {
    mkInitial       := AttributeExtension.mkInitial
    addImportedFn   := AttributeExtension.addImported
    addEntryFn      := addAttrEntry
    exportEntriesFn := fun s => s.newEntries.reverse.toArray
    statsFn         := fun s => format "number of local entries: " ++ format s.newEntries.length
  }
goal: IO Lean.AttributeExtension

full_name: Lean.isBuiltinAttribute
code: /-- Return true iff `n` is the name of a registered attribute. -/
@[export lean_is_attribute]
def isBuiltinAttribute (n : Name) : IO Bool 
goal: IO Bool

full_name: Lean.getBuiltinAttributeNames
code: /-- Return the name of all registered attributes. -/
def getBuiltinAttributeNames : IO (List Name) 
goal: IO (List Lean.Name)

full_name: Lean.getBuiltinAttributeImpl
code: def getBuiltinAttributeImpl (attrName : Name) : IO AttributeImpl 
goal: IO Lean.AttributeImpl

full_name: Lean.getBuiltinAttributeApplicationTime
code: @[export lean_attribute_application_time]
def getBuiltinAttributeApplicationTime (n : Name) : IO AttributeApplicationTime 
goal: IO Lean.AttributeApplicationTime

full_name: Lean.isAttribute
code: def isAttribute (env : Environment) (attrName : Name) : Bool 
goal: Bool

full_name: Lean.getAttributeNames
code: def getAttributeNames (env : Environment) : List Name 
goal: List Lean.Name

full_name: Lean.getAttributeImpl
code: def getAttributeImpl (env : Environment) (attrName : Name) : Except String AttributeImpl 
goal: Except String Lean.AttributeImpl

full_name: Lean.registerAttributeOfDecl
code: def registerAttributeOfDecl (env : Environment) (opts : Options) (attrDeclName : Name) : Except String Environment 
goal: Except String Lean.Environment

full_name: Lean.registerAttributeOfBuilder
code: def registerAttributeOfBuilder (env : Environment) (builderId ref : Name) (args : List DataValue) : IO Environment 
goal: IO Lean.Environment

full_name: Lean.Attribute.add
code: def Attribute.add (declName : Name) (attrName : Name) (stx : Syntax) (kind := AttributeKind.global) : AttrM Unit 
goal: Lean.AttrM Unit

full_name: Lean.Attribute.erase
code: def Attribute.erase (declName : Name) (attrName : Name) : AttrM Unit 
goal: Lean.AttrM Unit

full_name: Lean.updateEnvAttributesImpl
code: /-- `updateEnvAttributes` implementation -/
@[export lean_update_env_attributes]
def updateEnvAttributesImpl (env : Environment) : IO Environment 
goal: IO Lean.Environment

full_name: Lean.getNumBuiltinAttributesImpl
code: /-- `getNumBuiltinAttributes` implementation -/
@[export lean_get_num_attributes] def getNumBuiltinAttributesImpl : IO Nat 
goal: IO Nat