chore: rename renameMVar => setMVarUserName
This commit is contained in:
parent
00c4524e80
commit
cd0d7e676f
4 changed files with 6 additions and 6 deletions
|
|
@ -377,9 +377,9 @@ def tagUntaggedGoals (parentTag : Name) (newSuffix : Name) (newGoals : List MVar
|
|||
for g in newGoals do
|
||||
if mctx.isAnonymousMVar g then
|
||||
if numAnonymous == 1 then
|
||||
mctx := mctx.renameMVar g parentTag
|
||||
mctx := mctx.setMVarUserName g parentTag
|
||||
else
|
||||
mctx := mctx.renameMVar g (parentTag ++ newSuffix.appendIndexAfter idx)
|
||||
mctx := mctx.setMVarUserName g (parentTag ++ newSuffix.appendIndexAfter idx)
|
||||
idx := idx + 1
|
||||
pure mctx
|
||||
|
||||
|
|
|
|||
|
|
@ -418,8 +418,8 @@ def isReadOnlyLevelMVar (mvarId : MVarId) : MetaM Bool := do
|
|||
else
|
||||
return (← getLevelMVarDepth mvarId) != (← getMCtx).depth
|
||||
|
||||
def renameMVar (mvarId : MVarId) (newUserName : Name) : MetaM Unit :=
|
||||
modifyMCtx fun mctx => mctx.renameMVar mvarId newUserName
|
||||
def setMVarUserName (mvarId : MVarId) (newUserName : Name) : MetaM Unit :=
|
||||
modifyMCtx fun mctx => mctx.setMVarUserName mvarId newUserName
|
||||
|
||||
def isExprMVarAssigned (mvarId : MVarId) : MetaM Bool :=
|
||||
return (← getMCtx).isExprAssigned mvarId
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ def getMVarTag (mvarId : MVarId) : MetaM Name :=
|
|||
return (← getMVarDecl mvarId).userName
|
||||
|
||||
def setMVarTag (mvarId : MVarId) (tag : Name) : MetaM Unit := do
|
||||
modify fun s => { s with mctx := s.mctx.renameMVar mvarId tag }
|
||||
modify fun s => { s with mctx := s.mctx.setMVarUserName mvarId tag }
|
||||
|
||||
def appendTag (tag : Name) (suffix : Name) : Name :=
|
||||
tag.modifyBase (· ++ suffix.eraseMacroScopes)
|
||||
|
|
|
|||
|
|
@ -349,7 +349,7 @@ def setMVarKind (mctx : MetavarContext) (mvarId : MVarId) (kind : MetavarKind) :
|
|||
let decl := mctx.getDecl mvarId
|
||||
{ mctx with decls := mctx.decls.insert mvarId { decl with kind := kind } }
|
||||
|
||||
def renameMVar (mctx : MetavarContext) (mvarId : MVarId) (userName : Name) : MetavarContext :=
|
||||
def setMVarUserName (mctx : MetavarContext) (mvarId : MVarId) (userName : Name) : MetavarContext :=
|
||||
let decl := mctx.getDecl mvarId
|
||||
{ mctx with
|
||||
decls := mctx.decls.insert mvarId { decl with userName := userName }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue