@@ -164,10 +164,8 @@ def expandOptDocComment? [Monad m] [MonadError m] (optDocComment : Syntax) : m (
164164
165165section Methods
166166
167- variable [Monad m] [MonadEnv m] [MonadResolveName m] [MonadError m] [MonadFinally m] [MonadMacroAdapter m] [MonadRecDepth m] [MonadTrace m] [MonadOptions m] [AddMessageContext m] [MonadLog m] [MonadInfoTree m] [MonadLiftT IO m]
168-
169167/-- Elaborate declaration modifiers (i.e., attributes, `partial`, `private`, `protected`, `unsafe`, `meta`, `noncomputable`, doc string)-/
170- def elabModifiers (stx : TSyntax ``Parser.Command.declModifiers) : m Modifiers := do
168+ def elabModifiers (stx : TSyntax ``Parser.Command.declModifiers) : CoreM Modifiers := do
171169 let docCommentStx := stx.raw[0 ]
172170 let attrsStx := stx.raw[1 ]
173171 let visibilityStx := stx.raw[2 ]
@@ -209,7 +207,7 @@ Ensure the function has not already been declared, and apply the given visibilit
209207If `private`, return the updated name using our internal encoding for private names.
210208If `protected`, register `declName` as protected in the environment.
211209-/
212- def applyVisibility (modifiers : Modifiers) (declName : Name) : m Name := do
210+ def applyVisibility (modifiers : Modifiers) (declName : Name) : CoreM Name := do
213211 let mut declName := declName
214212 if !modifiers.visibility.isInferredPublic (← getEnv) then
215213 declName := mkPrivateName (← getEnv) declName
@@ -218,7 +216,7 @@ def applyVisibility (modifiers : Modifiers) (declName : Name) : m Name := do
218216 modifyEnv fun env => addProtected env declName
219217 pure declName
220218
221- def checkIfShadowingStructureField (declName : Name) : m Unit := do
219+ def checkIfShadowingStructureField (declName : Name) : CoreM Unit := do
222220 match declName with
223221 | Name.str pre .. =>
224222 if isStructure (← getEnv) pre then
@@ -228,7 +226,7 @@ def checkIfShadowingStructureField (declName : Name) : m Unit := do
228226 throwError "invalid declaration name `{.ofConstName declName}`, structure `{pre}` has field `{fieldName}`"
229227 | _ => pure ()
230228
231- def mkDeclName (currNamespace : Name) (modifiers : Modifiers) (shortName : Name) : m (Name × Name) := do
229+ def mkDeclName (currNamespace : Name) (modifiers : Modifiers) (shortName : Name) : CoreM (Name × Name) := do
232230 let mut shortName := shortName
233231 let mut currNamespace := currNamespace
234232 let view := extractMacroScopes shortName
0 commit comments