Skip to content

Commit

Permalink
feat: adaptations for leanprover/lean4#3159
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em committed Jan 23, 2024
1 parent 427cf7e commit b191117
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Std/CodeAction/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ partial def findInfoTree? (kind : SyntaxNodeKind) (tgtRange : String.Range)
(f : ContextInfo → Info → Bool) (canonicalOnly := false) :
Option (ContextInfo × InfoTree) :=
match t with
| .context ctx t => findInfoTree? kind tgtRange ctx t f canonicalOnly
| .context ctx t => findInfoTree? kind tgtRange (ctx.mergeIntoOuter? ctx?) t f canonicalOnly
| node@(.node i ts) => do
if let some ctx := ctx? then
if let some range := i.stx.getRange? canonicalOnly then
Expand Down
2 changes: 1 addition & 1 deletion Std/Lean/InfoTree.lean
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ partial def InfoTree.foldInfo' (init : α) (f : ContextInfo → InfoTree → α
where
/-- `foldInfo'.go` is like `foldInfo'` but with an additional outer context parameter `ctx?`. -/
go ctx? a
| context ctx t => go ctx a t
| context ctx t => go (ctx.mergeIntoOuter? ctx?) a t
| t@(node i ts) =>
let a := match ctx? with
| none => a
Expand Down
2 changes: 1 addition & 1 deletion lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:nightly-2024-01-16
leanprover/lean4:nightly-2024-01-23

0 comments on commit b191117

Please sign in to comment.