Type inference for LCNF #
@[reducible, inline]
We use a regular local context to store temporary local declarations created during type inference.
Equations
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
def
Lean.Compiler.LCNF.InferType.mkForallParams
(params : Array Lean.Compiler.LCNF.Param)
(type : Lean.Expr)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Lean.Compiler.LCNF.InferType.withLocalDecl
{α : Type}
(binderName : Lean.Name)
(type : Lean.Expr)
(binderInfo : Lean.BinderInfo)
(k : Lean.Expr → Lean.Compiler.LCNF.InferType.InferTypeM α)
:
Instances For
Instances For
Instances For
Equations
- Lean.Compiler.LCNF.InferType.inferArgType Lean.Compiler.LCNF.Arg.erased = pure Lean.Compiler.LCNF.erasedExpr
- Lean.Compiler.LCNF.InferType.inferArgType (Lean.Compiler.LCNF.Arg.type e) = Lean.Compiler.LCNF.InferType.inferType e
- Lean.Compiler.LCNF.InferType.inferArgType (Lean.Compiler.LCNF.Arg.fvar fvarId) = liftM (Lean.Compiler.LCNF.getType fvarId)
Instances For
def
Lean.Compiler.LCNF.InferType.inferAppTypeCore
(fType : Lean.Expr)
(args : Array Lean.Compiler.LCNF.Arg)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.InferType.inferProjType
(structName : Lean.Name)
(idx : Nat)
(s : Lean.FVarId)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
partial def
Lean.Compiler.LCNF.InferType.inferForallType.go
(e : Lean.Expr)
(fvars : Array Lean.Expr)
:
partial def
Lean.Compiler.LCNF.InferType.inferLambdaType.go
(e : Lean.Expr)
(fvars all : Array Lean.Expr)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
Instances For
def
Lean.Compiler.LCNF.Code.inferParamType
(params : Array Lean.Compiler.LCNF.Param)
(code : Lean.Compiler.LCNF.Code)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Instances For
def
Lean.Compiler.LCNF.mkAuxLetDecl
(e : Lean.Compiler.LCNF.LetValue)
(prefixName : Lean.Name := `_x)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.mkForallParams
(params : Array Lean.Compiler.LCNF.Param)
(type : Lean.Expr)
:
Instances For
def
Lean.Compiler.LCNF.mkAuxFunDecl
(params : Array Lean.Compiler.LCNF.Param)
(code : Lean.Compiler.LCNF.Code)
(prefixName : Lean.Name := `_f)
:
Instances For
def
Lean.Compiler.LCNF.mkAuxJpDecl
(params : Array Lean.Compiler.LCNF.Param)
(code : Lean.Compiler.LCNF.Code)
(prefixName : Lean.Name := `_jp)
:
Instances For
def
Lean.Compiler.LCNF.mkAuxJpDecl'
(param : Lean.Compiler.LCNF.Param)
(code : Lean.Compiler.LCNF.Code)
(prefixName : Lean.Name := `_jp)
:
Equations
- Lean.Compiler.LCNF.mkAuxJpDecl' param code prefixName = Lean.Compiler.LCNF.mkAuxFunDecl #[param] code prefixName
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Return true
if type
should be erased. See item 1 in the note above where x ◾ ◾
is
a proposition and should be erased when the universe level parameter is set to 0.
Remark: predVars
is a bitmask that indicates whether de-bruijn variables are predicates or not.
That is, #i
is a predicate if predVars[predVars.size - i - 1] = true