Documentation

Lean.Compiler.LCNF.SpecInfo

  • A parameter that is an type class instance (or an arrow that produces a type class instance), and is fixed in recursive declarations. By default, Lean always specializes this kind of argument.

    fixedInst: Lean.Compiler.LCNF.SpecParamInfo
  • A parameter that is a function and is fixed in recursive declarations. If the user tags a declaration with @[specialize] without specifying which arguments should be specialized, Lean will specialize .fixedHO arguments in addition to .fixedInst.

    fixedHO: Lean.Compiler.LCNF.SpecParamInfo
  • Computationally irrelevant parameters that are fixed in recursive declarations.

    fixedNeutral: Lean.Compiler.LCNF.SpecParamInfo
  • An argument that has been specified in the @[specialize] attribute. Lean specializes it even if it is not fixed in recursive declarations. Non-termination can happen, and Lean interrupts it with an error message based on the stack depth.

    user: Lean.Compiler.LCNF.SpecParamInfo
  • Parameter is not going to be specialized.

    other: Lean.Compiler.LCNF.SpecParamInfo

Each parameter is associated with a SpecParamInfo. This information is used by LCNF/Specialize.lean.

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

      Extension for storing SpecParamInfo for declarations being compiled. Remark: we only store information for declarations that will be specialized.

      Save parameter information for decls.

      Remark: this function, similarly to mkFixedArgMap, assumes that if a function f was declared in a mutual block, then decls contains all (computationally relevant) functions in the mutual block.

      Equations
      • One or more equations did not get rendered due to their size.
      def Lean.Compiler.LCNF.getSpecParamInfo? {m : TypeType} [inst : Monad m] [inst : Lean.MonadEnv m] (declName : Lean.Name) :
      Equations
      • One or more equations did not get rendered due to their size.
      def Lean.Compiler.LCNF.isSpecCandidate {m : TypeType} [inst : Monad m] [inst : Lean.MonadEnv m] (declName : Lean.Name) :
      Equations
      • One or more equations did not get rendered due to their size.