@[reducible, inline]
Instances For
- keys : Array Lean.Meta.InstanceKey
- val : Lean.Expr
- priority : Nat
The order in which the instance's arguments are to be synthesized.
- attrKind : Lean.AttributeKind
Instances For
Equations
- Lean.Meta.instInhabitedInstanceEntry = { default := { keys := default, val := default, priority := default, globalName? := default, synthOrder := default, attrKind := default } }
Equations
- Lean.Meta.instBEqInstanceEntry = { beq := fun (e₁ e₂ : Lean.Meta.InstanceEntry) => e₁.val == e₂.val }
Equations
- Lean.Meta.instToFormatInstanceEntry = { format := fun (e : Lean.Meta.InstanceEntry) => match e.globalName? with | some n => Lean.format n | x => Std.Format.text "<local>" }
@[reducible, inline]
Instances For
- discrTree : Lean.Meta.InstanceTree
- instanceNames : Lean.PHashMap Lean.Name Lean.Meta.InstanceEntry
- erased : Lean.PHashSet Lean.Name
Instances For
Equations
- Lean.Meta.instInhabitedInstances = { default := { discrTree := default, instanceNames := default, erased := default } }
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- d.eraseCore declName = { discrTree := d.discrTree, instanceNames := Lean.PersistentHashMap.erase d.instanceNames declName, erased := Lean.PersistentHashSet.insert d.erased declName }
Instances For
def
Lean.Meta.Instances.erase
{m : Type → Type}
[Monad m]
[Lean.MonadError m]
(d : Lean.Meta.Instances)
(declName : Lean.Name)
:
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.Meta.getGlobalInstancesIndex = do let __do_lift ← Lean.getEnv pure (Lean.ScopedEnvExtension.getState Lean.Meta.instanceExtension __do_lift).discrTree
Instances For
Equations
- Lean.Meta.getErasedInstances = do let __do_lift ← Lean.getEnv pure (Lean.ScopedEnvExtension.getState Lean.Meta.instanceExtension __do_lift).erased
Instances For
Equations
- Lean.Meta.isInstanceCore env declName = Lean.PersistentHashMap.contains (Lean.ScopedEnvExtension.getState Lean.Meta.instanceExtension env).instanceNames declName
Instances For
Equations
- Lean.Meta.isInstance declName = do let __do_lift ← Lean.getEnv pure (Lean.Meta.isInstanceCore __do_lift declName)
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.
Instances For
Default instance support #
@[reducible, inline]
Equations
- Lean.Meta.PrioritySet = Lean.RBTree Nat fun (x y : Nat) => compare y x
Instances For
- defaultInstances : Lean.NameMap (List (Lean.Name × Nat))
- priorities : Lean.Meta.PrioritySet
Instances For
Equations
- Lean.Meta.instInhabitedDefaultInstances = { default := { defaultInstances := default, priorities := default } }
def
Lean.Meta.addDefaultInstanceEntry
(d : Lean.Meta.DefaultInstances)
(e : Lean.Meta.DefaultInstanceEntry)
:
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.Meta.getDefaultInstancesPriorities = do let __do_lift ← Lean.getEnv pure (Lean.Meta.defaultInstanceExtension.getState __do_lift).priorities
Instances For
def
Lean.Meta.getDefaultInstances
{m : Type → Type}
[Monad m]
[Lean.MonadEnv m]
(className : Lean.Name)
:
Equations
- Lean.Meta.getDefaultInstances className = do let __do_lift ← Lean.getEnv pure (((Lean.Meta.defaultInstanceExtension.getState __do_lift).defaultInstances.find? className).getD [])