@[inline]
Equations
- Lean.Meta.testHelper e p = do let a ← p e if a = true then pure true else do let a ← Lean.Meta.whnf e p a
@[inline]
def
Lean.Meta.matchHelper?
{α : Type}
(e : Lean.Expr)
(p? : Lean.Expr → Lean.MetaM (Option α))
:
Lean.MetaM (Option α)
Equations
- Lean.Meta.matchHelper? e p? = do let a ← p? e match a with | none => do let a ← Lean.Meta.whnf e p? a | s => pure s
Equations
- Lean.Meta.matchEq? e = Lean.Meta.matchHelper? e fun e => pure (Lean.Expr.eq? e)
Equations
- Lean.Meta.matchHEq? e = Lean.Meta.matchHelper? e fun e => pure (Lean.Expr.heq? e)
Return some (α, lhs, rhs)
if e
is of the form @Eq α lhs rhs
or @HEq α lhs α rhs
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Meta.matchFalse e = Lean.Meta.testHelper e fun e => pure (Lean.Expr.isConstOf e `False)
Equations
- One or more equations did not get rendered due to their size.
Equations
- One or more equations did not get rendered due to their size.
Equations
- Lean.Meta.matchConstructorApp? e = do let env ← Lean.getEnv Lean.Meta.matchHelper? e fun e => pure (Lean.Expr.isConstructorApp? env e)