Type inference for LCNF #
@[inline, reducible]
We use a regular local context to store temporary local declarations created during type inference.
Equations
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
Equations
- One or more equations did not get rendered due to their size.
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 : Lake.Name)
(type : Lean.Expr)
(binderInfo : Lean.BinderInfo)
(k : Lean.Expr → Lean.Compiler.LCNF.InferType.InferTypeM α)
:
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
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
Equations
- One or more equations did not get rendered due to their size.
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 : Lake.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)
:
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
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
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.
- Lean.Compiler.LCNF.Code.inferType (Lean.Compiler.LCNF.Code.let decl k) = Lean.Compiler.LCNF.Code.inferType k
- Lean.Compiler.LCNF.Code.inferType (Lean.Compiler.LCNF.Code.fun decl k) = Lean.Compiler.LCNF.Code.inferType k
- Lean.Compiler.LCNF.Code.inferType (Lean.Compiler.LCNF.Code.jp decl k) = Lean.Compiler.LCNF.Code.inferType k
- Lean.Compiler.LCNF.Code.inferType (Lean.Compiler.LCNF.Code.return fvarId) = Lean.Compiler.LCNF.getType fvarId
- Lean.Compiler.LCNF.Code.inferType (Lean.Compiler.LCNF.Code.unreach type) = pure type
- Lean.Compiler.LCNF.Code.inferType (Lean.Compiler.LCNF.Code.cases c) = pure c.resultType
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
def
Lean.Compiler.LCNF.mkAuxLetDecl
(e : Lean.Compiler.LCNF.LetValue)
(prefixName : optParam Lake.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)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.mkAuxFunDecl
(params : Array Lean.Compiler.LCNF.Param)
(code : Lean.Compiler.LCNF.Code)
(prefixName : optParam Lake.Name `_f)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.mkAuxJpDecl
(params : Array Lean.Compiler.LCNF.Param)
(code : Lean.Compiler.LCNF.Code)
(prefixName : optParam Lake.Name `_jp)
:
Equations
- Lean.Compiler.LCNF.mkAuxJpDecl params code prefixName = Lean.Compiler.LCNF.mkAuxFunDecl params code prefixName
Instances For
def
Lean.Compiler.LCNF.mkAuxJpDecl'
(param : Lean.Compiler.LCNF.Param)
(code : Lean.Compiler.LCNF.Code)
(prefixName : optParam Lake.Name `_jp)
:
Equations
- Lean.Compiler.LCNF.mkAuxJpDecl' param code prefixName = let params := #[param]; Lean.Compiler.LCNF.mkAuxFunDecl params code prefixName
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
Lean.Compiler.LCNF.isErasedCompatible
(type : Lean.Expr)
(predVars : optParam (Array Bool) #[])
:
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
Equations
- Lean.Compiler.LCNF.isErasedCompatible type predVars = Lean.Compiler.LCNF.isErasedCompatible.go type predVars