Equations
- Lean.Options.empty = { entries := [] }
Instances For
Equations
- Lean.instInhabitedOptions = { default := { entries := [] } }
Equations
Equations
- Lean.instForInOptionsProdNameDataValue = inferInstanceAs (ForIn m Lean.KVMap (Lean.Name × Lean.DataValue))
Equations
- declName : Lean.Name
- defValue : Lean.DataValue
- group : String
- descr : String
Instances For
Equations
- Lean.instInhabitedOptionDecl = { default := { declName := default, defValue := default, group := default, descr := default } }
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
instance
Lean.instMonadOptionsOfMonadLift
{m n : Type → Type}
[MonadLift m n]
[Lean.MonadOptions m]
:
def
Lean.getBoolOption
{m : Type → Type}
[Monad m]
[Lean.MonadOptions m]
(k : Lean.Name)
(defValue : Bool := false)
:
m Bool
Equations
- Lean.getBoolOption k defValue = do let opts ← Lean.getOptions pure (Lean.KVMap.getBool opts k defValue)
Instances For
def
Lean.getNatOption
{m : Type → Type}
[Monad m]
[Lean.MonadOptions m]
(k : Lean.Name)
(defValue : Nat := 0)
:
m Nat
Equations
- Lean.getNatOption k defValue = do let opts ← Lean.getOptions pure (Lean.KVMap.getNat opts k defValue)
Instances For
- withOptions : {α : Type} → (Lean.Options → Lean.Options) → m α → m α
Instances
instance
Lean.instMonadWithOptionsOfMonadFunctor
{m n : Type → Type}
[MonadFunctor m n]
[Lean.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) => Lean.KVMap.setBool o `_inPattern true) x
Instances For
Equations
- o.getInPattern = Lean.KVMap.getBool o `_inPattern
Instances For
Equations
- Lean.instInhabitedOption = { default := { name := default, defValue := default } }
def
Lean.Option.get?
{α : Type}
[Lean.KVMap.Value α]
(opts : Lean.Options)
(opt : Lean.Option α)
:
Option α
Equations
- Lean.Option.get? opts opt = Lean.KVMap.get? opts opt.name
Instances For
Equations
- Lean.Option.get opts opt = Lean.KVMap.get opts opt.name opt.defValue
Instances For
def
Lean.Option.set
{α : Type}
[Lean.KVMap.Value α]
(opts : Lean.Options)
(opt : Lean.Option α)
(val : α)
:
Equations
- Lean.Option.set opts opt val = Lean.KVMap.set opts opt.name val
Instances For
def
Lean.Option.setIfNotSet
{α : Type}
[Lean.KVMap.Value α]
(opts : Lean.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 Lean.KVMap.contains opts opt.name = true then opts else Lean.Option.set opts opt val
Instances For
def
Lean.Option.register
{α : Type}
[Lean.KVMap.Value α]
(name : Lean.Name)
(decl : Lean.Option.Decl α)
(ref : Lean.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.