- 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
- discrTree : Lean.Meta.InstanceTree
- instanceNames : Lean.PHashMap Lake.Name Lean.Meta.InstanceEntry
- erased : Lean.PHashSet Lake.Name
Instances For
Instances For
Instances For
def
Lean.Meta.Instances.erase
{m : Type → Type}
[Monad m]
[Lean.MonadError m]
(d : Lean.Meta.Instances)
(declName : Lake.Name)
:
Instances For
Compute the order the arguments of inst
should by synthesized.
The synthesization order makes sure that all mvars in non-out-params of the subgoals are assigned before we try to synthesize it. Otherwise it goes left to right.
For example:
[Add α] [Zero α] : Foo α
returns[0, 1]
[Mul A] [Mul B] [MulHomClass F A B] : FunLike F A B
returns[2, 0, 1]
(because A B are out-params and are only filled in once we synthesize 2)
(The type of inst
must not contain mvars.)
Instances For
Instances For
Instances For
Instances For
Instances For
Instances For
Default instance support #
- defaultInstances : Lake.NameMap (List (Lake.Name × Nat))
- priorities : Lean.Meta.PrioritySet
Instances For
def
Lean.Meta.addDefaultInstanceEntry
(d : Lean.Meta.DefaultInstances)
(e : Lean.Meta.DefaultInstanceEntry)
: