- map : Lean.NameMap Lean.DataValue
- hasTrace : Bool
Whether any option with prefix
traceis set. This does not imply that any of such option is set totruebut it does capture the most common case that no such option has ever been touched.
Instances For
Instances For
Equations
- Lean.Options.instInhabited = { default := Lean.Options.empty }
Equations
- Lean.Options.instToString = { toString := fun (o : Lean.Options) => Lean.Options.instToString._private_1 o }
Equations
- Lean.Options.instBEq = { beq := fun (o1 o2 : Lean.Options) => Lean.Options.instBEq._private_1 o1 o2 }
Equations
- Lean.Options.instEmptyCollection = { emptyCollection := Lean.Options.empty }
@[deprecated Lean.Options.find? (since := "2026-01-15")]
Equations
Instances For
@[inline]
Equations
- o.get? k = ((Lean.Options.map✝ o).find? k).bind Lean.KVMap.Value.ofDataValue?
Instances For
@[inline]
Instances For
@[inline]
Equations
- o.insert k v = { map := (Lean.Options.map✝ o).insert k v, hasTrace := o.hasTrace || `trace.isPrefixOf k }
Instances For
Equations
- o.set k v = o.insert k (Lean.KVMap.Value.toDataValue v)
Instances For
Equations
- o.erase k = { map := Std.TreeMap.erase (Lean.Options.map✝ o) k, hasTrace := (Std.TreeMap.keys (Lean.Options.map✝¹ o)).any `trace.isPrefixOf }
Instances For
Equations
- Lean.Options.mergeBy f o1 o2 = { map := Std.TreeMap.mergeWith f (Lean.Options.map✝ o1) (Lean.Options.map✝¹ o2), hasTrace := o1.hasTrace || o2.hasTrace }
Instances For
Equations
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
- Lean.instInhabitedOptionDecls = { default := ∅ }
@[export lean_register_option]
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
@[export lean_get_option_decls_array]
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.getOptionDefaultValue name = do let decl ← Lean.getOptionDecl name pure decl.defValue
Instances For
Equations
- Lean.getOptionDescr name = do let decl ← Lean.getOptionDecl name pure decl.descr
Instances For
Equations
- Lean.instMonadOptionsOfMonadLift = { getOptions := liftM Lean.getOptions }
def
Lean.getBoolOption
{m : Type → Type}
[Monad m]
[MonadOptions m]
(k : Name)
(defValue : Bool := false)
:
m Bool
Equations
- Lean.getBoolOption k defValue = do let opts ← Lean.getOptions pure (opts.get k defValue)
Instances For
def
Lean.getNatOption
{m : Type → Type}
[Monad m]
[MonadOptions m]
(k : Name)
(defValue : Nat := 0)
:
m Nat
Equations
- Lean.getNatOption k defValue = do let opts ← Lean.getOptions pure (opts.get k defValue)
Instances For
instance
Lean.instMonadWithOptionsOfMonadFunctor
{m n : Type → Type}
[MonadFunctor m n]
[MonadWithOptions m]
:
Equations
- Lean.instMonadWithOptionsOfMonadFunctor = { withOptions := fun {α : Type} (f : Lean.Options → Lean.Options) (x : n α) => monadMap (fun {β : Type} => Lean.withOptions f) x }
Remark: _inPattern is an internal option for communicating to the delaborator that
the term being delaborated should be treated as a pattern.
Equations
- Lean.withInPattern x = Lean.withOptions (fun (o : Lean.Options) => o.set `_inPattern true) x
Instances For
Equations
- o.getInPattern = o.get `_inPattern false
Instances For
Instances For
Equations
- Lean.instInhabitedOption = { default := Lean.instInhabitedOption.default }
Equations
- Lean.Option.get? opts opt = opts.get? opt.name
Instances For
Equations
- Lean.Option.get opts opt = opts.get opt.name opt.defValue
Instances For
def
Lean.Option.getM
{m : Type → Type}
{α : Type}
[Monad m]
[MonadOptions m]
[KVMap.Value α]
(opt : Lean.Option α)
:
m α
Equations
- opt.getM = do let __do_lift ← Lean.getOptions pure (Lean.Option.get __do_lift opt)
Instances For
Equations
- Lean.Option.set opts opt val = opts.set opt.name val
Instances For
def
Lean.Option.setIfNotSet
{α : Type}
[KVMap.Value α]
(opts : Options)
(opt : Lean.Option α)
(val : α)
:
Similar to set, but update opts only if it doesn't already contains an setting for opt.name
Equations
- Lean.Option.setIfNotSet opts opt val = if opts.contains opt.name = true then opts else Lean.Option.set opts opt val
Instances For
def
Lean.Option.register
{α : Type}
[KVMap.Value α]
(name : Name)
(decl : Option.Decl α)
(ref : Name := by exact decl_name%)
:
IO (Lean.Option α)
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.