Skip to content

Commit

Permalink
chore: deprecate Expr.forallArity, per todo (#1046)
Browse files Browse the repository at this point in the history
  • Loading branch information
kim-em authored Nov 14, 2024
1 parent e2b30dc commit b100ff2
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions Batteries/Lean/Expr.lean
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,8 @@ def toSyntax (e : Expr) : TermElabM Syntax.Term := withFreshMacroScope do
@[deprecated (since := "2024-10-16"), inherit_doc getNumHeadLambdas]
abbrev lambdaArity := @getNumHeadLambdas

/--
Returns the number of leading `∀` binders of an expression. Ignores metadata.
-/
def forallArity : Expr → Nat
| mdata _ b => forallArity b
| forallE _ _ body _ => 1 + forallArity body
| _ => 0

-- TODO: replace `forallArity` after https://github.com/leanprover/lean4/pull/5729
-- @[deprecated (since := "2024-10-16"), inherit_doc getNumHeadForalls]
-- abbrev forallArity := @getNumHeadForalls
@[deprecated (since := "2024-11-13"), inherit_doc getNumHeadForalls]
abbrev forallArity := @getNumHeadForalls

/-- Like `withApp` but ignores metadata. -/
@[inline]
Expand Down

0 comments on commit b100ff2

Please sign in to comment.