- visitedLevel : Lean.LevelSet
- visitedExpr : Lean.ExprSet
- params : Array Lean.Name
Equations
- Lean.CollectLevelParams.instInhabitedState = { default := { visitedLevel := ∅, visitedExpr := ∅, params := #[] } }
@[inline]
def
Lean.CollectLevelParams.State.getUnusedLevelParam
(s : Lean.CollectLevelParams.State)
(pre : optParam Lean.Name `v)
:
Equations
- Lean.CollectLevelParams.State.getUnusedLevelParam s pre = let v := Lean.mkLevelParam pre; if Std.HashSet.contains s.visitedLevel v = true then (fun loop => loop 1) (Lean.CollectLevelParams.State.getUnusedLevelParam.loop s pre) else v
partial def
Lean.CollectLevelParams.State.getUnusedLevelParam.loop
(s : Lean.CollectLevelParams.State)
(pre : optParam Lean.Name `v)
(i : Nat)
: