chore: revert use of macro_inline for ctorIdx (#10141)
This PR reverts the `macro_inline` part of #10135.
This commit is contained in:
parent
2652cc18b8
commit
c83674bdff
1 changed files with 4 additions and 11 deletions
|
|
@ -72,17 +72,13 @@ public def mkCtorIdx (indName : Name) : MetaM Unit := do
|
|||
value := mkApp value alt
|
||||
pure value
|
||||
mkLambdaFVars (xs.push x) value
|
||||
let decl := .defnDecl (← mkDefinitionValInferringUnsafe
|
||||
addAndCompile (.defnDecl (← mkDefinitionValInferringUnsafe
|
||||
(name := declName)
|
||||
(levelParams := info.levelParams)
|
||||
(type := declType)
|
||||
(value := declValue)
|
||||
(hints := ReducibilityHints.abbrev)
|
||||
)
|
||||
addDecl decl
|
||||
if info.numCtors = 1 then
|
||||
setInlineAttribute declName .macroInline
|
||||
compileDecl decl
|
||||
))
|
||||
modifyEnv fun env => addToCompletionBlackList env declName
|
||||
modifyEnv fun env => addProtected env declName
|
||||
setReducibleAttribute declName
|
||||
|
|
@ -90,16 +86,13 @@ public def mkCtorIdx (indName : Name) : MetaM Unit := do
|
|||
-- Deprecated alias for enumeration types (which used to have `toCtorIdx`)
|
||||
if (← isEnumType indName) then
|
||||
let aliasName := mkToCtorIdxName indName
|
||||
let decl := .defnDecl (← mkDefinitionValInferringUnsafe
|
||||
addAndCompile (.defnDecl (← mkDefinitionValInferringUnsafe
|
||||
(name := aliasName)
|
||||
(levelParams := info.levelParams)
|
||||
(type := declType)
|
||||
(value := mkConst declName us)
|
||||
(hints := ReducibilityHints.abbrev)
|
||||
)
|
||||
addDecl decl
|
||||
setInlineAttribute aliasName .macroInline
|
||||
compileDecl decl
|
||||
))
|
||||
modifyEnv fun env => addToCompletionBlackList env aliasName
|
||||
modifyEnv fun env => addProtected env aliasName
|
||||
setReducibleAttribute aliasName
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue