Skip to content

Commit

Permalink
chore: adaptations for leanprover/lean4#3123
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em committed Jan 4, 2024
1 parent d8610e1 commit 1200cde
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Std/Lean/Meta/DiscrTree.lean
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ Inserts a new key into a discrimination tree,
but only if it is not of the form `#[*]` or `#[=, *, *, *]`.
-/
def insertIfSpecific [BEq α] (d : DiscrTree α)
(keys : Array DiscrTree.Key) (v : α) (config : WhnfCoreConfig) : DiscrTree α :=
(keys : Array DiscrTree.Key) (v : α) : DiscrTree α :=
if keys == #[Key.star] || keys == #[Key.const `Eq 3, Key.star, Key.star, Key.star] then
d
else
d.insertCore keys v config
d.insertCore keys v

variable {m : TypeType} [Monad m]

Expand Down
2 changes: 1 addition & 1 deletion Std/Tactic/Ext/Attr.lean
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ initialize extExtension :
SimpleScopedEnvExtension ExtTheorem ExtTheorems ←
registerSimpleScopedEnvExtension {
addEntry := fun { tree, erased } thm =>
{ tree := tree.insertCore thm.keys thm extExt.config, erased := erased.erase thm.declName }
{ tree := tree.insertCore thm.keys thm, erased := erased.erase thm.declName }
initial := {}
}

Expand Down
2 changes: 1 addition & 1 deletion Std/Tactic/Relation/Rfl.lean
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def reflExt.config : WhnfCoreConfig := {}
initialize reflExt :
SimpleScopedEnvExtension (Name × Array DiscrTree.Key) (DiscrTree Name) ←
registerSimpleScopedEnvExtension {
addEntry := fun dt (n, ks) => dt.insertCore ks n reflExt.config
addEntry := fun dt (n, ks) => dt.insertCore ks n
initial := {}
}

Expand Down
2 changes: 1 addition & 1 deletion Std/Tactic/Relation/Symm.lean
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def symmExt.config : WhnfCoreConfig := {}
initialize symmExt :
SimpleScopedEnvExtension (Name × Array DiscrTree.Key) (DiscrTree Name) ←
registerSimpleScopedEnvExtension {
addEntry := fun dt (n, ks) => dt.insertCore ks n symmExt.config
addEntry := fun dt (n, ks) => dt.insertCore ks n
initial := {}
}

Expand Down
2 changes: 1 addition & 1 deletion Std/Util/Cache.lean
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def DiscrTreeCache.mk [BEq α] (profilingName : String)
IO (DiscrTreeCache α) :=
let updateTree := fun name constInfo tree => do
return (← processDecl name constInfo).foldl (init := tree) fun t (k, v) =>
t.insertCore k v config
t.insertCore k v
let addDecl := fun name constInfo (tree₁, tree₂) =>
return (← updateTree name constInfo tree₁, tree₂)
let addLibraryDecl := fun name constInfo (tree₁, tree₂) =>
Expand Down

0 comments on commit 1200cde

Please sign in to comment.