Equations
- Lean.Compiler.neutralExpr = Lean.mkConst `_neutral
Equations
- Lean.Compiler.unreachableExpr = Lean.mkConst `_unreachable
Equations
Equations
- Lean.Compiler.voidType = Lean.mkConst `_void
Equations
- Lean.Compiler.mkLcProof pred = Lean.mkApp (Lean.mkConst `lcProof) pred
@[inline]
def
Lean.Compiler.atMostOnce.seq
(f : Lean.Compiler.atMostOnce.Visitor)
(g : Lean.Compiler.atMostOnce.Visitor)
:
Equations
- Lean.Compiler.atMostOnce.seq f g d = match f d with | { found := found, result := false } => { found := found, result := false } | other => g other
Equations
- Lean.Compiler.atMostOnce.instAndThenVisitor = { andThen := fun a b => Lean.Compiler.atMostOnce.seq a (b ()) }
@[inline]
Equations
@[inline]
Equations
- Lean.Compiler.atMostOnce e x = let x := Lean.Compiler.atMostOnce.visit x e { found := false, result := true }; match x with | { found := x, result := result } => result
Equations
- Lean.Compiler.mkEagerLambdaLiftingName n idx = Lean.Name.mkStr n ("_elambda_" ++ toString idx)
Equations
- Lean.Compiler.checkIsDefinition env n = match Lean.Environment.find? env n with | some (Lean.ConstantInfo.defnInfo x) => Except.ok () | some (Lean.ConstantInfo.opaqueInfo x) => Except.ok () | none => Except.error (toString "unknow declaration '" ++ toString n ++ toString "'") | x => Except.error (toString "declaration is not a definition '" ++ toString n ++ toString "'")
Equations
- Lean.Compiler.mkUnsafeRecName declName = Lean.Name.mkStr declName "_unsafe_rec"
Equations
- Lean.Compiler.isUnsafeRecName? x = match x with | Lean.Name.str n "_unsafe_rec" x => some n | x => none