Documentation

Lean.Class

  • Class name.

    name : Lean.Name
  • Position of the class outParams. For example, for class

    class GetElem (cont : Type u) (idx : Type v) (elem : outParam (Type w)) (dom : outParam (cont → idx → Prop)) where
    

    outParams := #[2, 3]

    outParams : Array Nat

An entry for the persistent environment extension for declared type classes

Instances For

    State of the type class environment extension.

    Instances For
      Equations
      Equations

      Switch the state into persistent mode. We switch to this mode after we read all imported .olean files. Recall that we use a SMap for implementing the state of the type class environment extension.

      Equations
      @[export lean_is_class]

      Return true if n is the name of type class in the given environment.

      Equations

      If declName is a class, return the position of its outParams.

      Equations
      @[export lean_has_out_params]

      Return true if the given declName is a type class with output parameters.

      Equations
      @[export lean_mk_outparam_args_implicit]

      Mark outParams in type as implicit. Note that it also marks instance implicit arguments that depend on outParams as implicit.

      Remark: this function consumes the outParam annotations.

      This function uses the same logic used as checkOutParam. See issue #1901

      Equations
      partial def Lean.mkOutParamArgsImplicit.go (type : Lean.Expr) (typeAux : Lean.Expr) (outParamFVarIds : Array Lean.FVarId) :

      Add a new type class with the given name to the environment. declName must not be the name of an existing type class, and it must be the name of constant in env. declName must be a inductive datatype or axiom. Recall that all structures are inductive datatypes.

      Equations
      • One or more equations did not get rendered due to their size.