def
Lean.Elab.ConfigEval.withClassInstDeps
(className : Name)
(type : Expr)
(extraDeps : Expr → TermElabM (Array Expr))
(mkCmd : Expr → TermElabM Command)
:
Helper for deriving instances along with all dependencies.
Given a one-parameter class className and a type type,
uses pre-existing conditional instances to figure out which types would
suffice to be implemented, then runs mkCmd on each type with fresh macro scopes.
The commands are generated and elaborated one at a time.
Equations
- One or more equations did not get rendered due to their size.