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
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
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
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.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
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
Equations
- Lean.Compiler.LCNF.AltCore.inferType alt = (Lean.Compiler.LCNF.AltCore.getCode alt).inferType
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 = Lean.Compiler.LCNF.mkAuxFunDecl #[param] 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