doc: remove inaccurate PersistentEnvExtension.setState/modifyState claim
Likely a copy-paste mistake Fixes #3039
This commit is contained in:
parent
e7691f37c6
commit
e28bfedae2
1 changed files with 2 additions and 2 deletions
|
|
@ -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) }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue