Equations
- Lean.Elab.DerivingHandler = (Array Lean.Name → Option (Lean.TSyntax `Lean.Parser.Term.structInst) → Lean.Elab.Command.CommandElabM Bool)
def
Lean.Elab.registerBuiltinDerivingHandlerWithArgs
(className : Lean.Name)
(handler : Lean.Elab.DerivingHandler)
:
A DerivingHandler
is called on the fully qualified names of all types it is running for
as well as the syntax of a with
argument, if present.
For example, deriving instance Foo with fooArgs for Bar, Baz
invokes
fooHandler #[`Bar, `Baz] `(fooArgs)
.
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Elab.registerBuiltinDerivingHandler
(className : Lean.Name)
(handler : Lean.Elab.DerivingHandlerNoArgs)
:
Like registerBuiltinDerivingHandlerWithArgs
but ignoring any with
argument.
Equations
- Lean.Elab.registerBuiltinDerivingHandler className handler = Lean.Elab.registerBuiltinDerivingHandlerWithArgs className fun typeNames x => handler typeNames
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Elab.applyDerivingHandlers
(className : Lean.Name)
(typeNames : Array Lean.Name)
(args? : Option (Lean.TSyntax `Lean.Parser.Term.structInst))
:
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.
- ref : Lean.Syntax
- className : Lean.Name
- args? : Option (Lean.TSyntax `Lean.Parser.Term.structInst)
def
Lean.Elab.getOptDerivingClasses
{m : Type → Type}
[inst : Monad m]
[inst : Lean.MonadEnv m]
[inst : Lean.MonadResolveName m]
[inst : Lean.MonadError m]
[inst : Lean.Elab.MonadInfoTree m]
(optDeriving : Lean.Syntax)
:
Equations
- One or more equations did not get rendered due to their size.
def
Lean.Elab.DerivingClassView.applyHandlers
(view : Lean.Elab.DerivingClassView)
(declNames : Array Lean.Name)
:
Equations
- Lean.Elab.DerivingClassView.applyHandlers view declNames = Lean.withRef view.ref (Lean.Elab.applyDerivingHandlers view.className declNames view.args?)