Skip to content

Commit

Permalink
chore: bump to v4.2.0-rc2 (#284)
Browse files Browse the repository at this point in the history
* chore: adapt to leanprover/lean4#2621

* bump to v4.2.0-rc2
  • Loading branch information
kim-em authored Oct 16, 2023
1 parent 45a5325 commit 85a0d48
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
8 changes: 5 additions & 3 deletions Std/Tactic/SimpTrace.lean
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ def mkSimpCallStx (stx : Syntax) (usedSimps : UsedSimps) : MetaM (TSyntax `tacti
let env ← getEnv
for (thm, _) in usedSimps.toArray.qsort (·.2 < ·.2) do
match thm with
| .decl declName => -- global definitions in the environment
| .decl declName inv => -- global definitions in the environment
if env.contains declName && !simpOnlyBuiltins.contains declName then
args := args.push (← `(Parser.Tactic.simpLemma|
$(mkIdent (← unresolveNameGlobal declName)):ident))
args := args.push (← if inv then
`(Parser.Tactic.simpLemma| ← $(mkIdent (← unresolveNameGlobal declName)):ident)
else
`(Parser.Tactic.simpLemma| $(mkIdent (← unresolveNameGlobal declName)):ident))
| .fvar fvarId => -- local hypotheses in the context
if let some ldecl := lctx.find? fvarId then
localsOrStar := localsOrStar.bind fun locals =>
Expand Down
8 changes: 5 additions & 3 deletions Std/Tactic/Simpa.lean
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,12 @@ private def mkSimpOnly (stx : Syntax) (usedSimps : UsedSimps) : MetaM Syntax.Tac
let env ← getEnv
for (thm, _) in usedSimps.toArray.qsort (·.2 < ·.2) do
match thm with
| .decl declName => -- global definitions in the environment
| .decl declName inv => -- global definitions in the environment
if env.contains declName && !simpOnlyBuiltins.contains declName then
args := args.push
(← `(Parser.Tactic.simpLemma| $(mkIdent (← unresolveNameGlobal declName)):ident))
args := args.push (← if inv then
`(Parser.Tactic.simpLemma| ← $(mkIdent (← unresolveNameGlobal declName)):ident)
else
`(Parser.Tactic.simpLemma| $(mkIdent (← unresolveNameGlobal declName)):ident))
| .fvar fvarId => -- local hypotheses in the context
if isSimpAll then
continue
Expand Down
2 changes: 1 addition & 1 deletion lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:v4.2.0-rc1
leanprover/lean4:v4.2.0-rc2

0 comments on commit 85a0d48

Please sign in to comment.