- visited : Lean.NameSet
- result : Array Lean.LocalDecl
@[inline]
Equations
- Lean.Meta.sortLocalDecls localDecls = let aux := do Array.forM Lean.Meta.SortLocalDecls.visitLocalDecl localDecls 0 (Array.size localDecls) let a ← get pure a.result; StateRefT'.run' (ReaderT.run aux { localDecls := Array.foldl (fun s d => Lean.NameMap.insert s (Lean.LocalDecl.fvarId d).name d) ∅ localDecls 0 (Array.size localDecls) }) { visited := ∅, result := #[] }