- visited : Lean.PtrSet Lean.Expr
- visitedConsts : Lean.NameHashSet
Instances For
@[reducible, inline]
Instances For
unsafe def
Lean.Expr.FoldConstsImpl.fold
{α : Type}
(f : Lean.Name → α → α)
(e : Lean.Expr)
(acc : α)
:
Equations
- Lean.Expr.FoldConstsImpl.fold f e acc = Lean.Expr.FoldConstsImpl.fold.visit f e acc
Instances For
unsafe def
Lean.Expr.FoldConstsImpl.fold.visit
{α : Type}
(f : Lean.Name → α → α)
(e : Lean.Expr)
(acc : α)
:
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[inline]
unsafe def
Lean.Expr.FoldConstsImpl.foldUnsafe
{α : Type}
(e : Lean.Expr)
(init : α)
(f : Lean.Name → α → α)
:
α
Equations
- Lean.Expr.FoldConstsImpl.foldUnsafe e init f = StateT.run' (Lean.Expr.FoldConstsImpl.fold f e init) { visited := Lean.mkPtrSet, visitedConsts := ∅ }
Instances For
@[implemented_by Lean.Expr.FoldConstsImpl.foldUnsafe]
Apply f
to every constant occurring in e
once.
Like Expr.getUsedConstants
, but produce a NameSet
.
Equations
- e.getUsedConstantsAsSet = e.foldConsts ∅ fun (c : Lean.Name) (cs : Lean.NameSet) => cs.insert c
Instances For
Return all names appearing in the type or value of a ConstantInfo
.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.