fix: simp attributes and macro scopes

This commit is contained in:
Sebastian Ullrich 2022-04-26 09:56:59 +02:00
parent 3cf642688b
commit 814f614369
2 changed files with 7 additions and 2 deletions

View file

@ -185,9 +185,9 @@ where
if let some e ← Term.resolveId? simpArgTerm (withInfo := true) then
return .expr e
else
resolveExt simpArgTerm.getId
resolveExt simpArgTerm.getId.eraseMacroScopes
catch _ =>
resolveExt simpArgTerm.getId
resolveExt simpArgTerm.getId.eraseMacroScopes
else if let some e ← Term.elabCDotFunctionAlias? simpArgTerm then
return .expr e
else

View file

@ -16,3 +16,8 @@ example : f x + g x = 2*x + 3 := by
example : f x = id (x + 2) := by
simp
simp [my_simp]
macro "my_simp" : tactic => `(simp [my_simp])
example : f x = id (x + 2) := by
my_simp