{σ : Type} →
  Lean.MVarId →
    (Lean.LocalContext → Lean.Name → Bool → σ → Lean.MetaM (Lean.Name × σ)) →
      ℕ → Lean.LocalContext → Array Lean.Expr → ℕ → σ → Lean.Expr → Lean.MetaM (Array Lean.Expr × Lean.MVarId)