feat: generalize withPPInaccessibleNames
This commit is contained in:
parent
4dabfef0e3
commit
4b69193442
1 changed files with 4 additions and 1 deletions
|
|
@ -20,9 +20,12 @@ register_builtin_option pp.inaccessibleNames : Bool := {
|
|||
descr := "display inaccessible declarations in the local context"
|
||||
}
|
||||
|
||||
def withPPInaccessibleNames (x : MetaM α) (flag := true) : MetaM α :=
|
||||
def withPPInaccessibleNamesImp (flag : Bool) (x : MetaM α) : MetaM α :=
|
||||
withTheReader Core.Context (fun ctx => { ctx with options := pp.inaccessibleNames.setIfNotSet ctx.options flag }) x
|
||||
|
||||
def withPPInaccessibleNames [MonadControlT MetaM m] [Monad m] (x : m α) (flag := true) : m α :=
|
||||
mapMetaM (withPPInaccessibleNamesImp flag) x
|
||||
|
||||
namespace ToHide
|
||||
|
||||
structure State where
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue