Type inference for LCNF #
@[reducible, inline]
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
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
def
Lean.Compiler.LCNF.InferType.withLocalDecl
{α : Type}
(binderName : Name)
(type : Expr)
(binderInfo : BinderInfo)
(k : Expr → InferTypeM α)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
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
Equations
- One or more equations did not get rendered due to their size.
- Lean.Compiler.LCNF.InferType.inferLetValueType Lean.Compiler.LCNF.LetValue.erased = pure Lean.Compiler.LCNF.erasedExpr
- Lean.Compiler.LCNF.InferType.inferLetValueType (Lean.Compiler.LCNF.LetValue.value v) = pure (Lean.Compiler.LCNF.InferType.inferLitValueType v)
- Lean.Compiler.LCNF.InferType.inferLetValueType (Lean.Compiler.LCNF.LetValue.proj structName idx fvarId) = Lean.Compiler.LCNF.InferType.inferProjType structName idx fvarId
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.
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.let decl k).inferType = k.inferType
- (Lean.Compiler.LCNF.Code.fun decl k).inferType = k.inferType
- (Lean.Compiler.LCNF.Code.jp decl k).inferType = k.inferType
- (Lean.Compiler.LCNF.Code.return fvarId).inferType = Lean.Compiler.LCNF.getType fvarId
- (Lean.Compiler.LCNF.Code.unreach type).inferType = pure type
- (Lean.Compiler.LCNF.Code.cases c).inferType = pure c.resultType
Instances For
Equations
- Lean.Compiler.LCNF.AltCore.inferType alt = (Lean.Compiler.LCNF.AltCore.getCode alt).inferType
Instances For
def
Lean.Compiler.LCNF.mkAuxJpDecl
(params : Array Param)
(code : Code)
(prefixName : Name := `_jp)
:
Equations
- Lean.Compiler.LCNF.mkAuxJpDecl params code prefixName = Lean.Compiler.LCNF.mkAuxFunDecl params code prefixName
Instances For
Equations
- Lean.Compiler.LCNF.mkAuxJpDecl' param code prefixName = Lean.Compiler.LCNF.mkAuxFunDecl #[param] code prefixName
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
Equations
- Lean.Compiler.LCNF.isErasedCompatible type predVars = Lean.Compiler.LCNF.isErasedCompatible.go type predVars