doc: remove inaccurate PersistentEnvExtension.setState/modifyState claim

Likely a copy-paste mistake

Fixes #3039
This commit is contained in:
Sebastian Ullrich 2024-09-27 15:59:36 +02:00 committed by GitHub
parent e7691f37c6
commit e28bfedae2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -515,11 +515,11 @@ def addEntry {α β σ : Type} (ext : PersistentEnvExtension α β σ) (env : En
def getState {α β σ : Type} [Inhabited σ] (ext : PersistentEnvExtension α β σ) (env : Environment) : σ :=
(ext.toEnvExtension.getState env).state
/-- Set the current state of the given extension in the given environment. This change is *not* persisted across files. -/
/-- Set the current state of the given extension in the given environment. -/
def setState {α β σ : Type} (ext : PersistentEnvExtension α β σ) (env : Environment) (s : σ) : Environment :=
ext.toEnvExtension.modifyState env fun ps => { ps with state := s }
/-- Modify the state of the given extension in the given environment by applying the given function. This change is *not* persisted across files. -/
/-- Modify the state of the given extension in the given environment by applying the given function. -/
def modifyState {α β σ : Type} (ext : PersistentEnvExtension α β σ) (env : Environment) (f : σσ) : Environment :=
ext.toEnvExtension.modifyState env fun ps => { ps with state := f (ps.state) }