Documentation

Lean.Elab.Deriving.Basic

Instances For

    Delta deriving handler. Creates an instance of class classStx for decl. The elaborated class expression may be underapplied (e.g. Decidable instead of Decidable _), and may be decl. If unfolding decl results in an underapplied lambda, then this enters the body of the lambda. We prevent classStx from referring to these local variables; instead it's expected that one uses section variables.

    This function can handle being run from within a nontrivial local context, and it uses mkValueTypeClosure to construct the final instance.

    Equations
      Instances For
        Equations
          Instances For

            Registers a deriving handler for a class. This function should be called in an initialize block.

            A DerivingHandler is called on the fully qualified names of all types it is running for. For example, deriving instance Foo for Bar, Baz invokes fooHandler #[`Bar, `Baz].

            Equations
              Instances For
                def Lean.Elab.applyDerivingHandlers (className : Name) (typeNames : Array Name) (setExpose : Bool := false) :
                Equations
                  Instances For
                    def Lean.Elab.DerivingClassView.ofSyntax :
                    TSyntax `Lean.Parser.Command.derivingClassCoreM DerivingClassView
                    Equations
                      Instances For
                        Equations
                          Instances For