Documentation

Lean.Data.Options

Equations
Instances For
Equations
@[export lean_register_option]
def Lean.registerOption (name : Name) (decl : OptionDecl) :
Equations
  • One or more equations did not get rendered due to their size.
@[export lean_get_option_decls_array]
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
def Lean.getBoolOption {m : TypeType} [Monad m] [MonadOptions m] (k : Name) (defValue : Bool := false) :
Equations
def Lean.getNatOption {m : TypeType} [Monad m] [MonadOptions m] (k : Name) (defValue : Nat := 0) :
m Nat
Equations
Equations

Remark: _inPattern is an internal option for communicating to the delaborator that the term being delaborated should be treated as a pattern.

def Lean.withInPattern {m : TypeType} {α : Type} [MonadWithOptions m] (x : m α) :
m α
Equations
structure Lean.Option (α : Type) :

A strongly-typed reference to an option.

  • name : Name
  • defValue : α
Instances For
Equations
structure Lean.Option.Decl (α : Type) :
def Lean.Option.get? {α : Type} [KVMap.Value α] (opts : Options) (opt : Lean.Option α) :
Equations
def Lean.Option.get {α : Type} [KVMap.Value α] (opts : Options) (opt : Lean.Option α) :
α
Equations
def Lean.Option.set {α : Type} [KVMap.Value α] (opts : Options) (opt : Lean.Option α) (val : α) :
Equations
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
def Lean.Option.register {α : Type} [KVMap.Value α] (name : Name) (decl : Option.Decl α) (ref : Name := by exact decl_name%) :
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.
Equations
  • One or more equations did not get rendered due to their size.