- visitedConsts : NameHashSet
Instances For
@[reducible, inline]
Instances For
@[inline]
unsafe def Lean.Expr.FoldConstsImpl.foldUnsafe {α : Type} (e : Expr) (init : α) (f : Name → α → α) :
α
Equations
- Lean.Expr.FoldConstsImpl.foldUnsafe e init f = StateT.run' (Lean.Expr.FoldConstsImpl.fold f e init) { }
Instances For
@[implemented_by Lean.Expr.FoldConstsImpl.foldUnsafe]
Apply f to every constant occurring in e once.
Equations
- e.getUsedConstants = e.foldConsts #[] fun (c : Lean.Name) (cs : Array Lean.Name) => cs.push c
Instances For
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
- One or more equations did not get rendered due to their size.
- c.getUsedConstantsAsSet = c.type.getUsedConstantsAsSet ++ match c.value? true with | some v => v.getUsedConstantsAsSet | none => ∅