feat: allow setting reducibilityCoreExt in async contexts (#11301)
This PR allows setting reducibilityCoreExt in async contexts (e.g. when using `mkSparseCasesOn` in a realizable definition)
This commit is contained in:
parent
01335863e6
commit
dedf7a8f44
1 changed files with 6 additions and 0 deletions
|
|
@ -36,6 +36,12 @@ builtin_initialize reducibilityCoreExt : PersistentEnvExtension (Name × Reducib
|
|||
statsFn := fun s => "reducibility attribute core extension" ++ Format.line ++ "number of local entries: " ++ format s.size
|
||||
-- attribute is set by `addPreDefinitions`
|
||||
asyncMode := .async .asyncEnv
|
||||
replay? := some <| fun _oldState newState newItems otherState =>
|
||||
newItems.foldl (init := otherState) fun otherState k =>
|
||||
if let some v := newState.find? k then
|
||||
otherState.insert k v
|
||||
else
|
||||
otherState
|
||||
}
|
||||
|
||||
builtin_initialize reducibilityExtraExt : SimpleScopedEnvExtension (Name × ReducibilityStatus) (SMap Name ReducibilityStatus) ←
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue