File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change 77
88prelude
99public import Lean.Elab.Util
10+ public import Lean.Compiler.InitAttr
1011import Lean.Parser.Term
1112
1213public section
@@ -56,6 +57,9 @@ def elabAttr [Monad m] [MonadEnv m] [MonadResolveName m] [MonadError m] [MonadMa
5657 | _ => throwErrorAt attr "Unknown attribute"
5758 let .ok _impl := getAttributeImpl (← getEnv) attrName
5859 | throwError "Unknown attribute `[{attrName}]`"
60+ if let .ok impl := getAttributeImpl (← getEnv) attrName then
61+ if isIOUnitRegularInitFn (← getEnv) impl.ref then -- skip `builtin_initialize` attributes
62+ recordExtraModUseFromDecl (isMeta := true ) impl.ref
5963 /- The `AttrM` does not have sufficient information for expanding macros in `args`.
6064 So, we expand them before here before we invoke the attributer handlers implemented using `AttrM`. -/
6165 return { kind := attrKind, name := attrName, stx := attr }
You can’t perform that action at this time.
0 commit comments