chore: prepare change
This commit is contained in:
parent
7ebe80ad2a
commit
67519e226a
1 changed files with 2 additions and 2 deletions
|
|
@ -78,12 +78,12 @@ def addBuiltin {γ} (attr : KeyedDeclsAttribute γ) (key : Key) (val : γ) : IO
|
|||
|
||||
/--
|
||||
def _regBuiltin$(declName) : IO Unit :=
|
||||
@addBuiltin $(mkConst valueTypeName) $(mkConst attrDeclName) $(key) $(mkConst declName)
|
||||
@addBuiltin $(mkConst valueTypeName) $(mkConst attrDeclName) $(key) $(declName) $(mkConst declName)
|
||||
-/
|
||||
def declareBuiltin {γ} (df : Def γ) (attrDeclName : Name) (env : Environment) (key : Key) (declName : Name) : IO Environment :=
|
||||
let name := `_regBuiltin ++ declName
|
||||
let type := mkApp (mkConst `IO) (mkConst `Unit)
|
||||
let val := mkAppN (mkConst `Lean.KeyedDeclsAttribute.addBuiltin) #[mkConst df.valueTypeName, mkConst attrDeclName, toExpr key, mkConst declName]
|
||||
let val := mkAppN (mkConst `Lean.KeyedDeclsAttribute.addBuiltin) #[mkConst df.valueTypeName, mkConst attrDeclName, toExpr key, toExpr declName, mkConst declName]
|
||||
let decl := Declaration.defnDecl { name := name, levelParams := [], type := type, value := val, hints := ReducibilityHints.opaque,
|
||||
safety := DefinitionSafety.safe }
|
||||
match env.addAndCompile {} decl with
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue